# The Security System Deep Dive

THE CHRISTMAS HEIST! · challenge 6 · hard

> Detective Quacker's 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. That's countless security events! We need to find 5-minute windows where Coach Waddles had ZERO checkpoint activity. Those gaps reveal when he was away making deliveries."

## 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.

## Tables

### `dbquacks_xmas.security_checkpoint_events`

A table in a MotherDuck share; its columns are not listed here.

## Data

The tables live in a DuckDB database: https://dbquacks.com/data/databases/christmas_local.duckdb

To query it outside the browser, attach it read-only:

```sql
ATTACH 'https://dbquacks.com/data/databases/christmas_local.duckdb' AS db (READ_ONLY);
USE db;
```

This level also queries MotherDuck shares, which need a MotherDuck token. On the page, the editor asks for one.

Play it in the browser: https://dbquacks.com/challenges/christmas/6

## Answer

The expected answer is not published. Submit on the page to have it checked.
