SQL Challenges · THE CHRISTMAS HEIST!

The Secret Route

Difficulty: hard

Detective Quackers suspicion grows. GPS gaps... packages being split... but wait, didnt we see Coach Waddles going somewhere unexpected? Captain Cosmos descends with satellite data and GPS trajectory analysis glowing with insights. Detective! Ive mapped Coach Waddles complete secret route using all that GPS data! The warehouse is at coordinates 45.5200 latitude, -122.6800 longitude. For Coach Waddles deliveries, I want to know which district he visited the most. Where did our suspect spend his…

Your task

Find which district received the most deliveries from Coach Waddles (id = 1). You will be working with `deliveries_log` and `duck_households` tables.

Tables

deliveries_log (10000 rows)

columntype
delivery_idINTEGER
household_idINTEGER
delivered_byINTEGER
delivery_timeTIMESTAMP
successBOOLEAN
parent_delivery_idINTEGER
delivery_metadataJSON

duck_households (200 rows)

columntype
household_idINTEGER
addressVARCHAR
districtVARCHAR
latitudeDOUBLE
longitudeDOUBLE
household_sizeINTEGER
income_levelVARCHAR
reported_missingBOOLEAN

Database: https://dbquacks.com/data/databases/christmas_local.duckdb

This page as markdown: https://dbquacks.com/challenges/christmas/13.md

Play this challenge →