A · Query · beginner · Week 1–2 · Chapter 3 of 12
WHERE, ORDER BY & LIMIT
Filter rows with WHERE. Sort with ORDER BY. Paginate with LIMIT/OFFSET. The bread and butter of exploratory queries.
Path progress19%
Step 1 of 3
WHERE operators
=, !=, <, >, BETWEEN, IN, LIKE, IS NULL. AND/OR — use parentheses when mixing.
Example
SELECT id, name, email
FROM users
WHERE active = 1
AND created_at >= '2024-01-01'
ORDER BY name ASC
LIMIT 10;Do this now
SQLBolt lessons 2–5. Save each to sql-notes/queries/.
Was this step clear?
Chapter learning outcomes
- WHERE conditions
- ORDER BY
- LIMIT/OFFSET
- AND/OR with parentheses
Clear these before you leave
Side quest
Exploratory questions
Answer 5 business questions with SELECT + WHERE only.