SQL Topics
Master SQL through topic-driven practice
Choose one SQL concept, practice it through a deliberate progression, and run every answer against realistic data. SQL Topics contains 219 free exercises across 15 focused collections.
Learn and master one SQL capability at a time.
Choose a SQL topic
219 interactive problems
SELECT Statements
23 problemsSelect columns, filter rows, remove duplicates, and order query results.
WHERE Clause & Filtering
12 problemsPractice SQL WHERE clauses with realistic boundary, NULL, text, date, exclusion, and production-filtering problems.
LIMIT & OFFSET
7 problemsPractice deterministic top-N, cutoff ties, offset pagination, composite keyset cursors, and resumable bounded batches.
Basic SQL Functions
13 problemsPractice production-oriented string cleanup, numeric transformations, NULL handling, tolerant conversion, and delimiter parsing.
ORDER BY & Sorting
15 problemsPractice deterministic SQL ordering with tie-breakers, custom priorities, NULL placement, expressions, joined data, aggregates, and portable top-N patterns.
SQL Joins
16 problemsPractice reliable INNER, LEFT, FULL, CROSS, self, semi, anti, range, temporal, and many-to-many join patterns.
SQL Subqueries
12 problemsPractice scalar, derived-table, correlated, EXISTS, NULL-safe anti-subquery, quantified, and row-subquery patterns.
CTEs & Window Functions
11 problemsPractice modular CTE pipelines, deterministic window analytics, period comparisons, deduplication, frames, and gaps-and-islands.
SQL Aggregations
16 problemsBuild reliable SQL metrics from aggregate functions through grain, fan-out, weighted ratios, rollups, percentiles, and approximate counts.
Ranking & NTH Value
17 problemsSolve deterministic ranking, top-N, distribution, positional-frame, and rolling-window problems.
Finding Duplicates & Data Quality
12 problemsDetect identity collisions, profile NULL-aware conflicts, and compare deterministic survivors with production-safe SQL.
CASE Statements & Conditional Logic
13 problemsBuild NULL-aware classifications, precedence-safe decisions, flags, scores, and guarded calculations with portable CASE expressions.
Database Changes
10 problemsPractice safe SQL data changes, schema evolution, retry-safe upserts, transactions, rollback, views, and indexes in isolated databases.
Date Operations & Time-Based Analytics
26 problemsPractice date arithmetic, safe timestamp ranges, calendar bucketing, dense time series, rolling windows, growth, and cohort analysis.
Self Joins & Hierarchical Queries
16 problemsQuery organization charts, trees, and parent-child relationships.