This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Part 1: Basic Queries | |
-- 1. Find the 10 longest books (by pages) in the database | |
-- SELECT title, pages FROM books ORDER BY pages DESC LIMIT 10; | |
-- 2. List all books published in 2020 | |
-- SELECT * FROM books WHERE published_date = 2020; | |
-- 3. Find books with ratings between 4.5 and 5.0 | |
-- SELECT title, average_rating FROM books WHERE average_rating BETWEEN 4.5 AND 5.0; |