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 problems

Select columns, filter rows, remove duplicates, and order query results.

BeginnerPractice SELECT Statements

LIMIT & OFFSET

22 problems

Solve pagination, deterministic ordering, and top-N query problems.

Beginner to IntermediatePractice LIMIT & OFFSET

SQL Joins

25 problems

Combine related tables with INNER, LEFT, RIGHT, FULL, and CROSS joins.

Beginner to AdvancedPractice SQL Joins

SQL Subqueries

12 problems

Practice nested, scalar, correlated, EXISTS, and IN query patterns.

Intermediate to AdvancedPractice SQL Subqueries

CTEs & Window Functions

22 problems

Build analytical queries with CTEs, ranking, offsets, and running totals.

AdvancedPractice CTEs & Window Functions

SQL Aggregations

20 problems

Summarize data with GROUP BY, HAVING, COUNT, SUM, AVG, MIN, and MAX.

Beginner to IntermediatePractice SQL Aggregations

Ranking & NTH Value

15 problems

Solve ordered-set problems with ROW_NUMBER, RANK, DENSE_RANK, and NTH_VALUE.

Intermediate to AdvancedPractice Ranking & NTH Value

Finding Duplicates

15 problems

Detect, count, and remove duplicates with grouping, windows, and CTEs.

IntermediatePractice Finding Duplicates

CASE Statements

15 problems

Use conditional expressions for classification, reporting, and transformation.

Beginner to IntermediatePractice CASE Statements

Date Operations

24 problems

Practice date arithmetic, formatting, filtering, and time-series analysis.

IntermediatePractice Date Operations

Self Joins & Hierarchical Queries

15 problems

Query organization charts, trees, and parent-child relationships.

AdvancedPractice Self Joins & Hierarchical Queries