An interactive SQL lab
Practice SQL and read query plans
Write SQL, check the returned rows, and see how the database finds them.
See what an index changes.
Find customer 42's orders, newest first.
| id | customer_id | created_at | total_cents | Match |
|---|---|---|---|---|
| 1 | 42 | 2026-01-03 | 1900 | |
| 2 | 42 | 2026-01-05 | 2200 | |
| 3 | 7 | 2026-01-04 | 1800 | |
| 4 | 42 | 2026-01-01 | 900 |
SELECT id, created_at, total_cents
FROM orders
WHERE customer_id = 42
ORDER BY created_at DESC;- 5 modules
- 54 exercises
- Module 1 is free
- $99 for lifetime access
- Runs in your browser
Choose where to start
New to SQL?
SQL foundations
Four free lessons on tables, columns, filters and sorting.
Start SQL foundationsAlready write SQL?
SQL performance
54 exercises on indexes, joins and query plans. The first module is free.
Start the free moduleWhat the performance course covers
Plan on about 9 to 22 hours.
Practice rewriting SQL while preserving duplicates, NULLs and ordering. Compare plans, test your answer on edge cases, and try another case of the same concept.
- Reading queriesFree10 exercises
- How queries run10 exercises
- Indexes10 exercises
- Joins12 exercises
- Sorting and grouping12 exercises
Modules 2 to 5 cost $99 once, for lifetime access. Module 1 is free.
QueryPlan pairs SQL results with SQLite plans so you can check what a change does. Try the free lessons before buying the performance course.
See Modules 2 to 5All sales are final except where required by applicable law. Terms.
Frequently asked questions
Can I start without SQL experience?
Yes. The free foundations path introduces tables, SELECT, filtering, and sorting in four guided lessons. The SQL performance course assumes you can already write basic queries.
Is QueryPlan video-based?
No. You learn by writing SQL, reading the query plan, and revising your query.
Why SQLite instead of PostgreSQL or MySQL?
SQLite can run real queries in your browser. You can practice identifying table scans, index searches, joins, and temporary sorts. PostgreSQL and MySQL use different plan terms and may choose different plans.
Who is this for?
Start with the free foundations path if you are new to SQL. If you know the basics, the performance course helps you understand indexes, joins, and execution plans.