SQL Practice

Real-life business problems on real tables. Read the scenario, write the query, and get it checked instantly.

Leaderboard
Intermediate25 pts

Revenue by product category

Joins

Solve challenge
Intermediate25 pts

Customers who never ordered

Joins

Solve challenge
Intermediate25 pts

Delivered orders per month

String & Date Functions

Solve challenge
Intermediate25 pts

Stars without words

NULL & CASE

Solve challenge
Intermediate25 pts

Who pays how: payment method share

Subqueries

Solve challenge
Intermediate25 pts

Podium finish: top 3 products per category

Window Functions

Solve challenge
Intermediate25 pts

Which sellers get their goods sent back?

Joins

Solve challenge
Intermediate25 pts

Repeat-purchase rate by country

CTEs & Recursion

Solve challenge
Intermediate25 pts

Month-over-month revenue rollercoaster

Window Functions

Solve challenge
Intermediate25 pts

Gadget and kitchen lovers who skip beauty

Set Operators

Solve challenge
Intermediate25 pts

Paying customers who never opened the product

Joins

Solve challenge
Intermediate25 pts

Where does the card money go?

Subqueries

Solve challenge
Intermediate25 pts

Cloudpeak MRR, month by month

CTEs & Recursion

Solve challenge
Intermediate25 pts

Rebuild the balance of account 15

Window Functions

Solve challenge
Intermediate25 pts

Angry and behind on payments

Set Operators

Solve challenge
Intermediate25 pts

Ageing report for overdue invoices

Analytics Patterns

Solve challenge
Intermediate25 pts

Build the 2025-26 league table from raw results

Analytics Patterns

Solve challenge
Intermediate25 pts

Earning more than your manager

Joins

Solve challenge
Intermediate25 pts

Departments that keep patients longer than the hospital average

Subqueries

Solve challenge
Intermediate25 pts

The top scorer of every club (ties included)

Window Functions

Solve challenge
Intermediate25 pts

Promoted stars with a clean record

Set Operators

Solve challenge
Intermediate25 pts

Which department sees the most abnormal lab results?

Joins

Solve challenge
Intermediate25 pts

Busiest routes and what they cost in minutes

Joins

Solve challenge
Intermediate25 pts

On-time scorecard by airline and quarter

NULL & CASE

Solve challenge
Intermediate25 pts

Passengers who out-spend the average traveller

Subqueries

Solve challenge
Intermediate25 pts

Building the airport watch list with set operators

Set Operators

Solve challenge
Intermediate25 pts

The longest silence between two flights

Window Functions

Solve challenge
Intermediate25 pts

Peak-hour demand ranking in every city

Window Functions

Solve challenge
Intermediate25 pts

Rider cohorts by month of first trip

CTEs & Recursion

Solve challenge
Intermediate25 pts

The silent shelf: tracks nobody has played

Joins

Solve challenge
Intermediate25 pts

Which plan do customers walk away from?

Aggregation

Solve challenge
Intermediate25 pts

Top 3 genres in every country

Window Functions

Solve challenge
Intermediate25 pts

Superfans who never wander off

Subqueries

Solve challenge
Intermediate25 pts

The comeback kids of 2026

Set Operators

Solve challenge
Intermediate25 pts

Skip rate by device

NULL & CASE

Solve challenge
Intermediate25 pts

The ten most valuable subscribers

NULL & CASE

Solve challenge