Learn SQL to query a real database in two months

Two months of practice — about 30 minutes a day across two free interactive sites and one murder mystery — gets a beginner from "what's a JOIN" to writing analytics queries against a real database. Roughly 30 hours total. SQL is the highest-leverage technical skill per hour you will ever invest.

2 months · ~30 hours · write multi-table JOIN and aggregate queries from scratch

Weeks 1–3 · 30 min/day

1.Select Star SQL

Zi Chong Kao's free interactive book teaches SQL by walking you through queries against the U.S. death-row database — strange, vivid material that makes the syntax stick. Every chapter has an editor that runs against a real SQLite instance in the browser. Read straight through. The narrative arc is what makes this better than a course: by the end you have a mental model of how queries are evaluated, not just how to type them.

Free

Select Star SQL →
Weeks 4–6 · 30 min/day

2.SQLZoo

SQLZoo has been around since 1999 and remains the canonical drill ground for working through SQL syntax muscle-memory. Do the tutorial sections in order, then the assessments. The exercises bias toward JOINs and subqueries, which is exactly what beginners avoid and exactly what working SQL is. Stop only when you can finish the "Self join" tutorial without hints.

Free

SQLZoo →
Weeks 7–8 · 45 min/day

3.The SQL Murder Mystery + your own data

Knight Lab's SQL Murder Mystery is a single ninety-minute puzzle that forces you to combine everything you have learned — joins, aggregates, filters, subqueries — to identify a fictional killer. After that, install PostgreSQL or DuckDB locally, load a CSV from your own life (bank statements, fitness data, anything), and answer five real questions about it. That is the moment SQL becomes a tool you own.

Free

SQL Murder Mystery →

If this doesn't fit you

If you need SQL for a job interview within weeks, skip the books and grind StrataScratch or LeetCode SQL problems instead — about 50 medium-difficulty questions covers most of what gets asked. You will pass interviews and forget half of it within a year. The path above gets you to actual fluency.

Why this path

Most SQL courses overteach DDL (CREATE TABLE, indexes, transactions) that beginners do not need and underteach the JOINs and aggregations that 95% of real querying is. Select Star SQL builds intuition; SQLZoo builds reps; the murder mystery and your own CSV close the gap to applied work. Skipping step three is the most common mistake — without your own data, the skill stays theoretical and slowly fades.