Multiple choice

The titles of all the books that meet the following criteria has to be displayed:

  1. Purchased before Feb 21, 2002
  2. Price is less than \$500 or greater than \$900 The result has to be sorted by the date of purchase, starting with the most recently bought book. Which of the following statements should be used?

  1. SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '21-FEB-2002' ORDER BY purchase_date

  2. SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date< '21-FEB-2002' ORDER BY purchase date ASC

  3. SELECT book_title FROM books WHERE price < 500 OR>900 AND purchase_date DESC

  4. SELECT Book_title FROM books WHERE (price < 500 OR Price>900)AND purchase_date<'21-FEB-2002' ORDER BY purchase date DESC

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

The correct query filters books purchased before Feb 21, 2002 with price outside the $500-$900 range (less than \$500 OR greater than \$900). The date condition uses < for 'before'. Results are sorted by purchase_date DESC to show most recent first. Option D has the correct logic with proper parentheses and DESC sorting. Note: there are minor typos but the logic is correct.