SQL exercises
Write the query, get it checked
10 SQL exercises you solve by writing a real query. It runs in your browser on SQLite and is checked against the expected result, with hints and a worked solution. Nothing is sent to a server, and your solved exercises are saved in this browser.
0 of 10 solved
- BeginnerFind duplicate emailsAggregation
- BeginnerSecond highest salaryRanking
- BeginnerCustomers who never orderedJoins & NULLs
- IntermediatePaid orders per customer, including zeroJoins & NULLs
- IntermediateTop earner per department, keeping tiesWindow functions
- IntermediateRunning total of revenueWindow functions
- IntermediateMonth-over-month growthWindow functions
- IntermediateKeep the latest row per customerDeduplication
- AdvancedUsers with a 3-day login streakGaps and islands
- AdvancedOrder and payment totals without double countingJoins