Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

UGC-NET | UGC NET CS 2018 July – II | Question 62

  • Last Updated : 14 Sep, 2018

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.


Answer: (C)

Explanation:

Select title
from book as B
where (select count ( * )
from book as T
where T.price > B.price) < 7

It will return titles of the seven most expensive books.
So, option (C) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :