Multiple choice

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 select? select title from book as B where ( select count(*) from book as T where T. price>B.Price)<5

  1. Titles of the four most expensive books

  2. Title of the fifth most inexpensive book

  3. Title of the fifth most expensive book

  4. Titles of the five most expensive books

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This SQL query selects the titles of the five most expensive books by comparing with each other.