Learn SQL, one concept at a time
Standalone tutorials on the SQL topics that trip people up: joins, window functions, CTEs, aggregation, and the interview patterns everyone asks about. Each guide is written as companion reading for the SQL Protocol campaign.
- Guide · 8 min read
SQL Joins Explained: INNER, LEFT, RIGHT, FULL
Plain-English walk-through of INNER, LEFT, RIGHT, and FULL OUTER joins with runnable examples and when to use each.
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL OUTER JOIN
- Guide · 10 min read
Window Functions: ROW_NUMBER, RANK, LEAD, LAG
A practical tour of SQL window functions. Learn PARTITION BY, ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG, and running totals.
- OVER and PARTITION BY
- ROW_NUMBER
- RANK vs DENSE_RANK
- LEAD and LAG
- Guide · 7 min read
GROUP BY and HAVING: The Difference Explained
Why WHERE runs before GROUP BY, why HAVING runs after, and how to stop getting cryptic 'column not in GROUP BY' errors.
- Execution order
- Aggregate functions
- GROUP BY vs DISTINCT
- HAVING vs WHERE
- Guide · 9 min read
Common Table Expressions (CTEs) and Recursion
Use CTEs to break long queries into labeled steps, replace confusing subqueries, and traverse hierarchies with recursive CTEs.
- WITH keyword
- CTE vs subquery
- Multiple CTEs
- Recursive CTEs
- Guide · 8 min read
Subqueries and EXISTS: Correlated vs Non-Correlated
When to reach for a scalar subquery, an IN clause, or EXISTS. Performance notes and common gotchas.
- Scalar subqueries
- IN vs EXISTS
- Correlated subqueries
- NOT EXISTS and NULL
- Interview Prep · 14 min read
15 SQL Interview Questions with Solutions
Fifteen realistic SQL interview problems across joins, aggregation, windowing, and schema design, each with a worked solution.
- Join puzzles
- Top-N per group
- Gaps and islands
- Rolling aggregates
- Roundup · 9 min read
Best SQL Games to Learn SQL in 2026
A fair, hands-on comparison of the best SQL games: SQL Murder Mystery, SQL Noir, SQL Island, Schemaverse, and SQL Protocol. What each is best for, which are free, and how to pick.
- SQL Murder Mystery
- SQL Noir
- SQL Island
- Schemaverse
- Roundup · 8 min read
7 Games Like SQL Murder Mystery (Free, 2026)
Loved SQL Murder Mystery? Seven free games with the same learn-by-querying feel: SQL Noir, SQL Island, SQL Police Department, Lost at SQL, SQL Protocol, and more, compared honestly.
- SQL Noir
- SQL Island
- SQL Police Department
- Lost at SQL
- Guide · 5 min read
Practice SQL Online Without Installing Anything (Free)
Free browser SQL practice with zero setup: no downloads, no database install, no signup. The honest list of places to run real queries online, and when a local database is worth it.
- Browser SQL editors
- DB Fiddle
- sql-practice.com
- SQLBolt
Reading is a warm-up. Practice is the workout.
Sign in to drill these concepts in the live game. Interview Mode gives you timed questions; the Arena puts you against another player on the same problem.