Practice roadmap & mastery checks
SQL becomes durable knowledge when you repeatedly solve unfamiliar questions against data. Reading syntax is only the first pass.
Stage 1 — query fluency
Without notes, be able to write SELECT, WHERE, ORDER BY, aliases, DISTINCT, IN, BETWEEN, LIKE, IS NULL, CASE, and basic aggregates. Complete several variations of the same problem rather than one copied example.
Stage 2 — relational reasoning
Practice INNER/LEFT joins, missing relationships, many-to-many joins, GROUP BY/HAVING, EXISTS/NOT EXISTS, UNION ALL, and EXCEPT. Before each query, write down the expected output grain.
Stage 3 — analytical SQL
Solve latest-row-per-group, top-N-per-group, running totals, previous/next event comparison, duplicate survivor selection, and sequence-gap detection with CTEs and window functions.
Stage 4 — safe data modification
In a disposable database, practice INSERT/UPDATE/DELETE inside transactions. Verify target rows before and after each mutation. Create tables with primary keys, foreign keys, uniqueness, NOT NULL, CHECK, and indexes.
Stage 5 — QA investigations
Use the site's practical SQL tasks and interview questions to diagnose intentionally imperfect data. Good tasks have no obvious keyword in the prompt; you must decide whether the solution needs a join, aggregate, subquery, set operation, or window function.
Mastery checklist
You are ready to call the core path complete when you can:
- explain result grain before running a query,
- predict INNER versus LEFT join survival,
- reason correctly about NULL and NOT EXISTS,
- prevent duplicate amplification in aggregates,
- use windows for ranking/latest/running calculations,
- compare expected and actual sets,
- design basic constraints and indexes,
- execute bounded writes transactionally,
- explain why parameter binding prevents SQL injection,
- read an execution plan at a basic level,
- identify when syntax is SQLite/PostgreSQL/MySQL/SQL Server specific.
This page is currently marked Under review while the new curriculum is validated against the site's runnable examples and cross-checked for dialect wording. The path is usable now; the status is intentionally between “under construction” and “review complete.”