SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Daily Driver Delivery Speed

Unsolved

DoorDash ranks drivers by speed each day. A delivery's duration is the whole minutes from picked_up_at to delivered_at, and it belongs to the calendar date of picked_up_at, even if it is delivered after midnight. Deliveries that were never completed (delivered_at is NULL) are ignored. For each day, average each driver's durations and rank drivers with DENSE_RANK, where the lowest average is rank 1 and equal averages share a rank. Write an SQL query that returns delivery_date, driver_id, avg_minutes rounded to 2 decimal places, and speed_rank. Order the results by delivery_date, then speed_rank, then driver_id.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 DoorDash

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM deliveries
Full source dataset
10 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine