Browse by topic, difficulty, company, or industry. Every exercise has sample data, expected output, AI-explained hints, and a worked solution. The Skillmap tracks where you're strong and where you need more reps.
Or let the Coach pick — 1 click, the next exercise targets your weakest skill.
Pick the lens that matches what you're trying to do — close a topic gap, prep for a specific company, or just drill at a difficulty.
By topic
Drill one pattern at a time. Window functions, JOINs, GROUP BY, subqueries, CTEs, NULL handling, CASE WHEN.
By difficulty
94 Easy, 126 Medium, 79 Hard. Easy and Medium are free; Hard is Pro except 6 free previews, and the Coach gates it until you've shown mastery on Medium.
By company
FAANG plus marketplaces and finance. Each exercise tagged from real interview reports.
By industry
Real public datasets, not synthetic ecommerce. The schemas your future job actually uses.
Or drill one topic on its own page: GROUP BY & aggregation · Window functions · Joins · CTEs · CASE WHEN · Subqueries · Date functions · NULL handling · String functions · Ranking functions · Advanced SQL interview questions — or compare them side by side on SQL practice by topic, or open every question as its own page.
Each topic page lists the runnable set for one line of the Skillmap, from the first Easy to the last Hard.
Window Functions
RANK, ROW_NUMBER, LAG/LEAD, running totals
Practice this topic →
Joins
INNER, LEFT, anti-joins, self-joins
Practice this topic →
CTEs
WITH, chained and recursive CTEs
Practice this topic →
Subqueries
Correlated, EXISTS, IN, derived tables
Practice this topic →
Aggregation & Grouping
GROUP BY, HAVING, conditional aggregates
Practice this topic →
Conditional Logic
CASE WHEN inside SELECT, WHERE and ORDER BY
Practice this topic →
Date Functions
Date math, truncation, month-over-month
Practice this topic →
NULL Handling
COALESCE, IS NULL, NULLs in joins and aggregates
Practice this topic →
String Functions
LIKE, SUBSTR, TRIM, pattern matching
Practice this topic →
299 exercises as of September 2026, counted from the live bank: 190 core problems plus 97 on the three industry tracks. Every exercise shows its worked solution once you've solved it.
| Bank | Easy | Medium | Hard | Total |
|---|---|---|---|---|
| Core exercises | 53 | 81 | 54 | 188 |
| Sector tracks (banking · real estate · manufacturing) | 38 | 39 | 20 | 97 |
| All exercises | 91 | 120 | 74 | 285 |
Easy — 91 exercises, all free
SELECT, WHERE, ORDER BY, LIMIT, basic aggregates and GROUP BY. The beginner ladder starts here — no signup, queries run in the browser.
Intermediate (Medium) — 126 exercises, all free
JOINs, subqueries, CTEs, CASE WHEN, HAVING, first window functions. The largest tier, and where most analyst-round patterns live.
Hard — 74 exercises, 6 free previews
Nested window functions, recursive CTEs, business math, FAANG-style patterns. Pro ($29/month · $99/year) unlocks the other 68.
Industry tracks: Banking & Finance (57 exercises), Real Estate (20), Manufacturing (20). Their Easy and Medium problems are free like the rest of the bank. The Coach gates Hard until you've shown mastery on Medium; browse mode lets you open any free exercise directly.
Every exercise on SQL Quest has the same anatomy: prompt, sample data, expected output, your editor, instant feedback. Here's a Medium-difficulty Window Function exercise.
📋 The prompt
For each department, find the top 3 highest-paid employees. If two employees are tied at the same salary, both should appear (and they share the rank). Output columns: name, department, salary, ordered by department, then salary descending.
📊 Sample data — employees
| id | name | department | salary |
|---|---|---|---|
| 1 | Alice | Engineering | 180000 |
| 2 | Bob | Engineering | 170000 |
| 3 | Carol | Engineering | 170000 |
| 4 | Dan | Sales | 120000 |
| 5 | Eve | Sales | 110000 |
✅ Expected output
| name | department | salary |
|---|---|---|
| Alice | Engineering | 180000 |
| Bob | Engineering | 170000 |
| Carol | Engineering | 170000 |
| Dan | Sales | 120000 |
| Eve | Sales | 110000 |
💡 Hint progression
Hint 1: "Ranking ties — which window function keeps both Bob and Carol at rank 2 instead of giving one rank 3?"
Hint 2: "Wrap your ranked query in a CTE. You can't filter on a window function in the same WHERE."
Show Structure: skeleton with WITH/PARTITION/ORDER BY blanks.
🔓 Solution (revealed only when you ask)
SQL Quest tracks your proficiency across 9 canonical skills. Each exercise contributes points to the skills it exercises — weighted by difficulty, your speed, and how many hints you used.
More points
First-attempt solve on a Hard exercise without revealing structure or asking the AI Coach. The clearest signal of real mastery.
Some points
Used Show Structure or asked the Coach. Still counts — you learned something — but at a discount. The radar reflects guided solves differently than cold ones.
Mastery check
After a lesson, the Coach drops you on 2-3 unseen exercises in the same skill. Recognition isn't enough; you have to produce. That's what gates advancement.
Free, browser-only, no signup. The Coach can pick the next exercise — or you can browse.
Open SQL Quest — Free ⚡