ER-Model
May 14, 2024
Database-Management-System
May 14, 2024
ER-Model
May 14, 2024
Database-Management-System
May 14, 2024

Database-Management-System

Question 851

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.
Question 851 Explanation: 
→ SQL query, which results titles of the 7 most expensive books.
→ The where clause of outer query will be true for 7 most expensive books.
Note: All aggregate functions except count(*) ignore NULL values in their input collection.
Correct Answer: C
Question 851 Explanation: 
→ SQL query, which results titles of the 7 most expensive books.
→ The where clause of outer query will be true for 7 most expensive books.
Note: All aggregate functions except count(*) ignore NULL values in their input collection.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!