SQL course · 24 lessons · 6 stages

Learn SQL, one pattern at a time

Each lesson focuses on one SQL pattern, helping you write queries that return the results you expect. The lessons progress from basic to advanced. You can follow them in order or directly jump to any topic.

What every pattern is aboutA SQL query can run without errors and still return the wrong results.
RequirementPaid or pending orders from India.
The query
SELECT order_id, country, status
FROM order_status
WHERE country = 'India'
AND status = 'paid'
OR status = 'pending';
Result3 rows
order_idcountrystatus
1Indiapaid
3UKpending
4Indiapending
Order 3 is from the UK. AND groups before OR, and P01 shows why.
00 · Start hereIntroduction to Databases and SQLLearn what a database is, how relational databases organise data, and how SQL helps you work with it.
Read the intro →
01

Foundations

Filter your query results.
P01–P03
02

Summarising Data

Turn rows into totals that answer the right question.
P04–P06
03

Combining Data

Join tables without inventing or losing rows.
P07–P10
04

Real-World Data

Survive dates, strings, and types as they actually arrive.
P11–P14
05

Analytical & Sequence

Rank, compare, and read order across rows.
P15–P19
06

Advanced SQL

Reshape, recurse, and measure whole journeys.
P20–P24