SQL Practice
Real-life business problems on real tables. Read the scenario, write the query, and get it checked instantly.
Intermediate25 pts
Revenue by product category
Joins
Solve challengeIntermediate25 pts
Customers who never ordered
Joins
Solve challengeIntermediate25 pts
Delivered orders per month
String & Date Functions
Solve challengeIntermediate25 pts
Stars without words
NULL & CASE
Solve challengeIntermediate25 pts
Who pays how: payment method share
Subqueries
Solve challengeIntermediate25 pts
Podium finish: top 3 products per category
Window Functions
Solve challengeIntermediate25 pts
Which sellers get their goods sent back?
Joins
Solve challengeIntermediate25 pts
Repeat-purchase rate by country
CTEs & Recursion
Solve challengeIntermediate25 pts
Month-over-month revenue rollercoaster
Window Functions
Solve challengeIntermediate25 pts
Gadget and kitchen lovers who skip beauty
Set Operators
Solve challengeIntermediate25 pts
Paying customers who never opened the product
Joins
Solve challengeIntermediate25 pts
Where does the card money go?
Subqueries
Solve challengeIntermediate25 pts
Cloudpeak MRR, month by month
CTEs & Recursion
Solve challengeIntermediate25 pts
Rebuild the balance of account 15
Window Functions
Solve challengeIntermediate25 pts
Angry and behind on payments
Set Operators
Solve challengeIntermediate25 pts
Ageing report for overdue invoices
Analytics Patterns
Solve challengeIntermediate25 pts
Build the 2025-26 league table from raw results
Analytics Patterns
Solve challengeIntermediate25 pts
Earning more than your manager
Joins
Solve challengeIntermediate25 pts
Departments that keep patients longer than the hospital average
Subqueries
Solve challengeIntermediate25 pts
The top scorer of every club (ties included)
Window Functions
Solve challengeIntermediate25 pts
Promoted stars with a clean record
Set Operators
Solve challengeIntermediate25 pts
Which department sees the most abnormal lab results?
Joins
Solve challengeIntermediate25 pts
Busiest routes and what they cost in minutes
Joins
Solve challengeIntermediate25 pts
On-time scorecard by airline and quarter
NULL & CASE
Solve challengeIntermediate25 pts
Passengers who out-spend the average traveller
Subqueries
Solve challengeIntermediate25 pts
Building the airport watch list with set operators
Set Operators
Solve challengeIntermediate25 pts
The longest silence between two flights
Window Functions
Solve challengeIntermediate25 pts
Peak-hour demand ranking in every city
Window Functions
Solve challengeIntermediate25 pts
Rider cohorts by month of first trip
CTEs & Recursion
Solve challengeIntermediate25 pts
The silent shelf: tracks nobody has played
Joins
Solve challengeIntermediate25 pts
Which plan do customers walk away from?
Aggregation
Solve challengeIntermediate25 pts
Top 3 genres in every country
Window Functions
Solve challengeIntermediate25 pts
Superfans who never wander off
Subqueries
Solve challengeIntermediate25 pts
The comeback kids of 2026
Set Operators
Solve challengeIntermediate25 pts
Skip rate by device
NULL & CASE
Solve challengeIntermediate25 pts
The ten most valuable subscribers
NULL & CASE
Solve challenge