Module 5 · You are here
Filtering and Sorting: WHERE, ORDER BY, LIMIT
Move from "show me ten rows" to "show me the rows that actually answer my question." You'll meet the full operator menu, combine conditions with AND/OR, handle NULLs the right way, and float the headline row to the top with ORDER BY.
By the end of Module 5, you will be able to:
- Add a WHERE clause to filter rows by one condition.
- Use the full operator menu: =, !=, >, <, >=, <=, IN, NOT, LIKE, BETWEEN.
- Combine conditions with AND, OR, and NOT.
- Handle missing values correctly with IS NULL and IS NOT NULL.
- Sort with ORDER BY (ASC / DESC, multi-column).
- Use LIMIT after ORDER BY to return the top N results.
Subsections in Module 5
5.1
WHERE: the gatekeeper
Open 5.2The operator menu
Open 5.3AND, OR, NOT
Open 5.4NULLs and the gotcha
Open 5.5ORDER BY + checkpoint
OpenStart here: Module 5.1 · WHERE: the gatekeeper
Begin Module 5
After Module 5: Module 6 · Summarizing and Sharing: GROUP BY, COUNT, Saved Queries
Next: Module 6 · Summarizing and Sharing: GROUP BY, COUNT, Saved Queries