SQL exercises
Filter by difficulty, topic, or the business database behind the question. Progress stays on this device until you create an account.
Loading exercises…
Filter by difficulty, topic, or the business database behind the question. Progress stays on this device until you create an account.
Loading exercises…
Find users who were active in their signup month and the following calendar month.
SaaS · 20 min
Date functions · Subqueries
Start challengeBuild a running total of succeeded payments in chronological order.
E-commerce · 14 min
Window Functions
Start challengeRank every employee by their current annual salary.
HR · 16 min
Window Functions · JOINs · Subqueries
Start challengeList the ledger accounts that hold cash or record operating expenses.
Finance · 6 min
SELECT · WHERE
Start challengeList outpatient encounters that started in 2025.
Healthcare · 8 min
SELECT · WHERE · Date functions
Start challengeShow the three shipments that were delivered most recently.
Logistics · 7 min
SELECT · WHERE · ORDER BY · LIMIT
Start challengeList payments that did not remain as collected cash.
E-commerce · 6 min
SELECT · WHERE
Start challengeRank marketing campaigns from the largest budget to the smallest.
Marketing · 6 min
SELECT · ORDER BY
Start challengeList each current job title once.
HR · 6 min
SELECT · DISTINCT
Start challenge