A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?

select title
from book as B
where (select count(*)
from book as T
where T.price > B.price) < 5
a. Titles of the four most expensive books
b. Title of the fifth most inexpensive book
c. Title of the fifth most expensive bookTitles of the five most expensive books
d. Titles of the five most expensive books
Answer:Titles of the five most expensive books
Teju :(August 24, 2019) Q24. Consider a relation book (title, price) which contains the titles and prices of different books.
Assuming that no two books have the same price, what does the following SQL query list ?
Select title
from book as B
where (select count ( * )
from book as T
where T.price > B.price) < 7

a. Titles of the six most expensive books.
b. Title of the sixth most expensive books.
c. Titles of the seven most expensive books.
d. Title of the seventh most expensive books.
Now answer...?
Click to Add Comment

Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: