Most online SQL tutorials are videos with a fake terminal. This one drops you into a real SQLite engine in your browser and asks you to write the query. From your first SELECT to top-N-per-group window functions in 12 steps.
No install · No signup · Take the placement check to skip what you know
1
Not videos, not slides — a real SQLite engine in your browser. Lesson 1's first query runs in under 60 seconds.
2
When your query fails, you get the specific gap — wrong column count, sort order, NULL bug — not a generic "incorrect."
3
Lesson done isn't enough. The Coach schedules a fresh-solve check the next day so concepts transfer to long-term memory.
Click into the app to start any lesson. The placement check at the start of the app skips lessons you've already mastered.
Read columns from a table. Understand SELECT, FROM, and the difference between picking specific columns and SELECT *. By the end you can list every passenger on the Titanic and how old they were.
Filter rows with predicates. Compare numbers (>, <, BETWEEN), match strings (LIKE, IN), and combine conditions with AND/OR. The trap most beginners hit: col = NULL never returns rows — use IS NULL.
Order results with ORDER BY (ascending, descending, multiple columns), cut to top-N with LIMIT, paginate with OFFSET. The non-obvious rule: top-N without an ORDER BY is undefined.
COUNT, SUM, AVG, MIN, MAX. The subtlety: COUNT(*) counts all rows including NULLs; COUNT(col) ignores NULLs. AVG and SUM also ignore NULLs.
Compute aggregates per category with GROUP BY, filter groups with HAVING. Master the conditional-aggregate trick (SUM(CASE WHEN ...)) — it's the single most-asked technique in interview SQL.
Join two tables with INNER JOIN on a key. Understand "row multiplication" (one-to-many joins multiply row counts) and how to alias tables for clarity. This is the lesson where most beginners fall behind in their first SQL course — give it real time.
LEFT JOIN keeps unmatched rows on the left. The anti-join pattern (LEFT JOIN ... WHERE right.id IS NULL) finds "X without a matching Y." The most expensive bug in SQL: filtering the right table in WHERE instead of ON silently turns LEFT into INNER.
Use a query as a value (scalar subquery), as a list (IN), or as a check (EXISTS). Learn why NOT IN is a NULL trap and NOT EXISTS is the safe alternative.
Break complex queries into named steps with WITH. Each CTE reads top-to-bottom — far more maintainable than nested subqueries. Recursive CTEs walk hierarchies (org charts, comment trees) and generate sequences.
Express conditional logic in SELECT, in ORDER BY, and inside aggregates. The pivot pattern — SUM(CASE WHEN x THEN 1 ELSE 0 END) — turns categorical data into separate counted columns. Foundation of every dashboard query.
ROW_NUMBER, RANK, DENSE_RANK. Understand PARTITION BY (groups within a window) and how the three rankers handle ties differently. The single most-asked topic in mid-to-senior data interviews.
LAG and LEAD peek at neighboring rows for day-over-day deltas, churn detection, sessionization. Running totals and rolling averages with the ROWS BETWEEN frame. Top-N per group via ROW_NUMBER + filter — the single most-asked window pattern.
12 lessons gets you fluent enough to write everyday analyst SQL. Pick the next track based on your goal.
Free, browser-only, no signup. The placement check skips lessons you've already mastered.
Start the Tutorial — Free ⚡