1 · Read and filter · 8 MIN
Filter rows
Filter rows.
WHERE filters individual rows before they enter the result. Use = for equality and single quotes for text. >= includes the boundary. NULL requires IS NULL rather than = NULL.
Think of a spreadsheet: select columns, keep relevant rows, and summarize the result.
Read the example
SELECT amount FROM expenses WHERE category = 'food' ORDER BY id;
Check the expected output
[[5],[7]]
Your challenge
Return amounts at least 7, ordered by id.
Common trap
Row order is only guaranteed with ORDER BY.
Next lesson: Sort deliberately →