👋 New to SQL? Start here.
Follow this path in order — each step builds on the last.
Your learning path
Foundations Track
SELECT, WHERE, ORDER BY, GROUP BY — get data out of a database. ~2 hours.
Start here if new
Practitioner Track
JOINs, subqueries, aggregations, indexes — the patterns every developer uses. ~3 hours.
Advanced Track
Window functions, CTEs, query planning, transactions, schema design. ~4 hours.
📑 Reference Pages
Deep dives into each part of SQL. Read when you need to understand something properly, or use as a lookup while coding.
SQL Overview
What SQL is, relational databases, the SQL standard.
Querying
SELECT, WHERE, ORDER BY, LIMIT, LIKE, IN — the basics.
JOINs & Aggregates
INNER/LEFT/RIGHT JOIN, GROUP BY, HAVING, COUNT, SUM, AVG.
Advanced SQL
Window functions, CTEs, subqueries, indexes, EXPLAIN.
▶ Run Code & Copy Snippets
Copy ready-to-use code patterns or run SQL right in your browser.
🛠 Projects
SQL is used in many of the 14 Python projects for data storage. The SQL playground lets you run real queries now.
🟩 Foundations
Short programs using basic syntax only.
Number Guessing Game
To-Do List
📊 Go Further
Compare SQL to Other Languages
Side-by-side syntax comparison across all 11 languages on The Codex.
History of Programming Languages
How SQL came to be, what problems it solved, and how it fits the bigger picture.
Programming Glossary
Plain English definitions for 80 terms — variable, function, loop, class, API, and more.