SQL & Databases
18 short, gradual lessons: read tables and use SELECT, then filter and sort, before moving to aggregates, groups and JOIN. A consistent shop database lets you inspect tables, run queries and check answers independently.
- Tables, Rows, Columns — and Your First Query
- Choose columns and their order
- WHERE: choose which rows to keep
- Comparisons: boundaries, numbers and text
- Combine conditions with AND, OR and parentheses
- NULL is not empty text
- WHERE — Filtering Rows, and What NULL Means
- Sort rows with a stable order
- Unique values and a short result
- ORDER BY, LIMIT, and DISTINCT
- Count and summarise with meaning
- A separate summary for each group
- Filter rows, then filter groups
- COUNT, SUM, AVG with GROUP BY and HAVING
- Match customers to their orders
- Keep customers without orders
- Count orders per customer
- INNER JOIN vs LEFT JOIN