Free SQL course

Learn the SQL that interviews actually test.

Forty short lessons, from your first SELECT to the window functions and patterns Meta, Google, Amazon and the rest of big tech test. You write the queries, every answer is checked, and each module ends on three interview problems. Nothing to install.

Free with an account — your progress is saved to it. No card, no trial.

The syllabus

Eight modules, about ten hours in total. Take them in order or jump straight to the one you need — nothing is locked.

1Reading a table4 lessonsSELECT, WHERE, ORDER BY, LIMIT and DISTINCT — getting exactly the rows and columns you mean, and sizing up a table you have never seen.31 min
2Aggregation5 lessonsCOUNT, SUM, AVG, MIN and MAX; GROUP BY and HAVING; percentages and ratios, and the integer division that makes a percentage query return 0.45 min
3Joins and grain6 lessonsInner, left, right and full outer joins; keys and grain; fan-out and double counting; anti-joins, semi-joins and self-joins.1 h
4NULLs, dedup and conditional logic5 lessonsHow NULL behaves in comparisons and aggregates; COALESCE and NULLIF; the NOT IN trap; CASE and conditional aggregation; removing duplicates.45 min
5Dates and time4 lessonsHalf-open ranges and the BETWEEN trap; DATE_TRUNC, EXTRACT and date arithmetic; bucketing by day, week and month; gaps between events.35 min
6CTEs and subqueries4 lessonsSubqueries in WHERE, FROM and SELECT; CTEs; and how to split a hard question into steps.35 min
7Window functions6 lessonsPartitions, ranking and ties, LAG and LEAD, running totals and rolling seven-day windows.49 min
8Interview patterns6 lessonsTop-N per group, retention and cohorts, funnels, streaks and gaps, set operations and string clean-up — plus timed drills you write without running, the way live screens work.1 h 5 min

How a lesson works

Short lessons, real queries

A few paragraphs, then you write SQL against realistic tables and see the result immediately.

Every answer is checked

Exercises compare your result to the expected one. When it’s wrong you see the exact mismatch, and for the classic mistakes, what went wrong and how to fix it.

Finish on interview problems

Each module ends with three problems. Most come from our bank of 188 SQL questions asked at Meta, Google, Amazon and 20 other companies; where the bank has nothing a module can close on, we wrote our own. Solve them here and they count on your dashboard.

40 lessons · 8 modules · 24 interview problems · free

Start at lesson one. Keep everything you learn.

Create your free account

Google sign-in only — no passwords to manage.