New · SQL by doing

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
regionSUM(revenue)
East306
North159
West882

✓ 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.

Design a database Pro

5

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

Pro
6

6. Normalization, the intuitive way

Split a messy table until every fact lives in one place

Soon
7

7. Constraints

CHECK, DEFAULT and what happens ON DELETE

Soon
8

8. Views

Save a query as a table everyone can use

Soon
9

9. Triggers

Make the database react: logs, stock counts, timestamps

Soon
10

10. Indexes and transactions

Why some queries are fast, and all-or-nothing changes

Soon

Advanced queries Pro

11

11. Window functions

ROW_NUMBER, RANK, running totals, LAG and LEAD

Soon
12

12. CASE, COALESCE and dates

Buckets, defaults for NULLs, grouping by month

Soon
13

13. Interview questions

Top N per group, second highest, duplicates, retention

Soon
14

14. Final project: a car repair shop

Design the whole database from scratch, then answer the owner's questions with it

Soon