SQL Challenges · THE CHRISTMAS HEIST!

The Pattern Emerges

Difficulty: easy

Detective Quacker spreads out a district map on his desk with pushpins marking each theft. Weve narrowed down our suspect pool, Duckbert! Now lets see which district suffered the most thefts. Every crime has a pattern! Group our missing present reports by district and find where the criminal struck hardest. Geographic clustering always reveals something important about the perpetrators territory!

Your task

Find the district with the most theft reports. Each report has a household_id that links to a household, and each household belongs to a district. You will be working with the `missing_presents_report` and `duck_households` tables.

Tables

missing_presents_report (93 rows)

columntype
report_idINTEGER
household_idINTEGER
present_idINTEGER
reported_dateTIMESTAMP
quantity_missingINTEGER
last_seen_locationVARCHAR
reporter_nameVARCHAR

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/3.md

Play this challenge →