Unit 1
First queries
Ask a database a question and get a table back.
Unit 2
Sharper filters
Combine conditions, match patterns, and handle missing data.
Unit 3
Counting things
Summarise thousands of rows into a single answer.
Unit 4
Joining tables
Connect customers, orders and menu items at Rocket Pizza.
Unit 5
Combining results
Stack results with UNION, and join tables to themselves.
Unit 6
Queries inside queries
Subqueries and CTEs: break big questions into small ones.
Unit 7
Window functions
Rankings and running totals — the interview favourite.
Unit 8
Changing data
Insert, update and delete rows, without wrecking the table.
Unit 9
Text and dates
Clean up text and do date maths, where PostgreSQL and SQLite differ most.
Unit 10
Cleaning messy data
Fix blanks, stray spaces, text numbers and duplicates in a real-world import.
Unit 11
Designing tables
Create tables, add constraints, change them safely and build views.
Unit 12
Recursive queries
WITH RECURSIVE for sequences, calendars and org charts.
Unit 13
Advanced windows
Moving averages, shares of total, buckets and subtotals.
Unit 14
Making queries fast
Indexes, query plans, and filters that can use an index.
Unit 15
Analytics patterns
The capstone: product metrics on Streamly, a growing music app.
Unit 16
Interview pack
Original interview-style problems that combine everything. The clock is running.