SQL practice

Grouped by pattern, the way you will meet them on the job. Every query runs on DuckDB in your browser against bitshop, ridelog or helpdesk.

0 of 25 shipped

Filter and aggregate 3

#ProblemTopicLevelTimeStatus
01Revenue by categoryFilter and aggregateSQLeasy10m○ not started
02Trip stats by cityFilter and aggregateSQLeasy10m○ not started
03SLA breaches by priorityFilter and aggregateSQLmedium20m○ not started

Joins and anti-joins 3

#ProblemTopicLevelTimeStatus
04Customers who never orderedJoins and anti-joinsSQLeasy10m○ not started
05Agents hired before their managerJoins and anti-joinsSQLeasy10m○ not started
06Units sold per productJoins and anti-joinsSQLmedium15m○ not started

Window functions 3

#ProblemTopicLevelTimeStatus
07Running revenue by monthWindow functionsSQLeasy15m○ not started
08Driver earnings rankWindow functionsSQLeasy15m○ not started
09Weekly ticket changeWindow functionsSQLmedium20m○ not started

Top-N per group 2

#ProblemTopicLevelTimeStatus
10Top product per categoryTop-N per groupSQLmedium20m○ not started
11Top three drivers per cityTop-N per groupSQLhard30m○ not started

CTEs and recursion 2

#ProblemTopicLevelTimeStatus
12First-response SLA by channelCTEs and recursionSQLmedium25m○ not started
13Agent reporting chainCTEs and recursionSQLhard30m○ not started

Gaps and islands 2

#ProblemTopicLevelTimeStatus
14Days off between shiftsGaps and islandsSQLeasy15m○ not started
15Longest online streak per driverGaps and islandsSQLmedium25m○ not started

Deduplication 2

#ProblemTopicLevelTimeStatus
16Keep the first-ingested copy of each eventDeduplicationPipelinesmedium20m○ not started
17Duplicate ingest rate by event typeDeduplicationPipelinesmedium15m○ not started

Sessionisation 2

#ProblemTopicLevelTimeStatus
18Session ids for app eventsSessionisationPipelinesmedium25m○ not started
19Session summary per userSessionisationPipelineshard35m○ not started

Date spines 2

#ProblemTopicLevelTimeStatus
20Daily orders including zero daysDate spinesSQLeasy15m○ not started
21Daily open ticket backlogDate spinesSQLmedium25m○ not started

Pivot and unpivot 2

#ProblemTopicLevelTimeStatus
22Tickets by priority and channelPivot and unpivotSQLeasy10m○ not started
23SLA hit rate by metricPivot and unpivotSQLhard35m○ not started

Slowly changing dimensions 2

#ProblemTopicLevelTimeStatus
24Price validity rangesSlowly changing dimensionsData modellingmedium20m○ not started
25List price at order timeSlowly changing dimensionsData modellinghard30m○ not started