SQL Challenges · THE CHRISTMAS HEIST!
The Elite Performers
Difficulty: medium
Detective Quacker paces the room. Driving through blizzard conditions... somethings not adding up. This doesnt feel like a criminal! General Gander arrives with strategic analysis charts and tactical maps covering all districts. Detective! Ive been reviewing the case files. Strategic profiling requires comparative analysis! For EACH district separately, I need to identify the volunteer with the most deliveries. Some volunteers excel in multiple districts, others in just one. Heres the question:…
Your task
Find all volunteers who rank #1 (most deliveries) in at least one district, then count ALL their deliveries across the entire dataset. Use the `delivered_by` column in deliveries_log to identify volunteers. You will be working with `deliveries_log` and `duck_households` tables. Note: It's possible for the same volunteer (like duck_id 1) to rank #1 in multiple districts - this is expected and correct.