SQL Challenges · THE CHRISTMAS HEIST!
The Security System Deep Dive
Difficulty: hard
Detective Quackers office door bursts open. Dr. Temporal here! announces a duck in a lab coat, carrying hard drives full of surveillance data. Those anonymous and secret mentions got me curious! The warehouse installed an advanced security system in December that logs EVERY checkpoint event—gate scans, door sensors, badge swipes, camera detections. Thats countless security events! We need to find 5-minute windows where Coach Waddles had ZERO checkpoint activity. Those gaps reveal when he was aw…
Your task
Count how many 5-minute periods in December 2025 have no security checkpoint activity for Coach Waddles (duck_id = 1). You will be working with the `dbquacks_xmas.security_checkpoint_events` (MotherDuck) table.<br />Hint: Create a 'date spine' using <a href='https://duckdb.org/docs/stable/sql/functions/list#generate_seriesstart-stop-step' target='_blank' rel='noopener noreferrer' class='text-blue-400 hover:text-blue-300 underline'>GENERATE_SERIES</a> to generate all 5-minute time slots in December 2025, then use this spine to find slots with no activity.