Stop reading SQL tutorials.
Write queries.
Short drills on a real database, right in your browser. You write the query, it's checked instantly, and when it's wrong you see why. No install, no sign-up.
SELECT region, SUM(revenue) FROM orders GROUP BY region
| region | SUM(revenue) |
|---|---|
| East | 306 |
| North | 159 |
| West | 882 |
✓ Correct. Every column in SELECT is either in GROUP BY or inside an aggregate like SUM.
A real database
SQLite runs in your browser, so every query really runs. Same SQL you'd write in MySQL or PostgreSQL for these basics.
Feedback that explains
Wrong column count, missing GROUP BY, WHERE instead of HAVING, double quotes around text: it tells you what went wrong.
No shortcuts
Your query also runs on changed data, so typing the answer in doesn't pass. It has to actually work.
The path
The level test and lessons 1–4 (everything you need to write queries) are free. Pro adds database design and advanced SQL, and also unlocks the Excel and finance lessons.
SQL level test
10 questions, SELECT to JOINs and subqueries
1. SELECT, WHERE and ORDER BY
Columns, filters, AND, LIKE, sorting, LIMIT. 7 drills
2. COUNT, SUM and GROUP BY
Aggregates, GROUP BY, HAVING, COUNT(DISTINCT). 7 drills
3. JOINs
INNER and LEFT JOIN, finding what's missing, the classic traps. 7 drills
4. Subqueries and CTEs
IN, the NOT IN + NULL trap, COUNT(*) vs COUNT(col), WITH. 7 drills
Design a database Pro
5. Keys and relationships
Primary and foreign keys, one-to-many, many-to-many with a link table. Your tables get tested with real rows. 7 drills
6. Normalization, the intuitive way
Split a messy table until every fact lives in one place
7. Constraints
CHECK, DEFAULT and what happens ON DELETE
8. Views
Save a query as a table everyone can use
9. Triggers
Make the database react: logs, stock counts, timestamps
10. Indexes and transactions
Why some queries are fast, and all-or-nothing changes
Advanced queries Pro
11. Window functions
ROW_NUMBER, RANK, running totals, LAG and LEAD
12. CASE, COALESCE and dates
Buckets, defaults for NULLs, grouping by month
13. Interview questions
Top N per group, second highest, duplicates, retention
14. Final project: a car repair shop
Design the whole database from scratch, then answer the owner's questions with it