What does the WHERE clause do?
- Sorts the surviving rows
- Keeps only rows passing its test
- Creates a new table
In SELECT title, author FROM Books, what does SELECT do?
- Names the columns to return
- Deletes the whole table
- Sorts the authors
OR keeps only the rows that pass both sides of the test.
Circle one: True False
WHERE NOT returned. Which rows survive?
- Every row in the table
- Rows where the book is still out
- Rows where the book is back on the shelf
WHERE pages > 300 AND borrowed = yes. Which books survive?
- Borrowed books, long or not
- Long books, borrowed or not
- Only books that are both long and borrowed
ORDER BY title followed by LIMIT 10 returns the first ten titles alphabetically.
Circle one: True False
A query fails on a column that does not exist. What should you check first?
- The schema, to see the real tables and columns
- The keyboard, for stuck keys
- The clock, for the wrong time
Which query lists the titles of books borrowed after 2025-06-01, sorted by title?
- SELECT * FROM Books WHERE title > '2025-06-01' ORDER BY borrowed_on
- SELECT title FROM Books ORDER BY title WHERE borrowed_on > '2025-06-01'
- SELECT title FROM Books WHERE borrowed_on > '2025-06-01' ORDER BY title