Practice library
SQL Practice Problems by Topic
Choose one SQL skill, solve its problems in sequence, and run every answer against realistic data. The library contains 208 free exercises across 11 focused topics.
Begin with one topic. Progress when the pattern feels automatic.
Choose a SQL topic
208 interactive problems
SELECT Statements
23 problemsSelect columns, filter rows, remove duplicates, and order query results.
LIMIT & OFFSET
22 problemsSolve pagination, deterministic ordering, and top-N query problems.
SQL Joins
25 problemsCombine related tables with INNER, LEFT, RIGHT, FULL, and CROSS joins.
SQL Subqueries
12 problemsPractice nested, scalar, correlated, EXISTS, and IN query patterns.
CTEs & Window Functions
22 problemsBuild analytical queries with CTEs, ranking, offsets, and running totals.
SQL Aggregations
20 problemsSummarize data with GROUP BY, HAVING, COUNT, SUM, AVG, MIN, and MAX.
Ranking & NTH Value
15 problemsSolve ordered-set problems with ROW_NUMBER, RANK, DENSE_RANK, and NTH_VALUE.
Finding Duplicates
15 problemsDetect, count, and remove duplicates with grouping, windows, and CTEs.
CASE Statements
15 problemsUse conditional expressions for classification, reporting, and transformation.
Date Operations
24 problemsPractice date arithmetic, formatting, filtering, and time-series analysis.
Self Joins & Hierarchical Queries
15 problemsQuery organization charts, trees, and parent-child relationships.