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)(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.
Answer: (C)
Explanation:Select title from book as B where (select count ( * ) from book as T where T.price > B.price)It will return titles of the seven most expensive books.
So, option (C) is correct.
Quiz of this Question
Article Tags :
Recommended Articles