First date-bucket query. WHERE on a date-string range, DATE_TRUNC to monthly buckets, COUNT(*). Anchors the BOPIS program operational dashboard.
Board prep this Friday. Give me Q4 2025 BOPIS pickup volume bucketed monthly. fact_pickups has every pickup event we logged. Filter to Oct/Nov/Dec 2025. Two columns: pickup_month (the first of each month as a date) and pickup_count. ORDER BY pickup_month ASC.
| Column | Type | Key |
|---|---|---|
| pickup_id | INT | PK |
| order_id | INT | FK → fact_orders |
| pickup_ts | TEXT | |
| pickup_window_minutes | INT | |
| no_show_flag | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
fact_pickups is the source — every web_bopis order that had a pickup logged.
Filter pickup_ts >= '2025-10-01' AND pickup_ts < '2026-01-01' for Q4 2025.
DATE_TRUNC('month', pickup_ts::timestamp)::date buckets to month-start.
GROUP BY pickup_month, ORDER BY pickup_month ASC.