Multiple AVG date diffs
Decompose dock-to-stock: arrival-to-unload, unload-to-count, count-to-putaway. Three averages in minutes.
| Column | Type | Key |
|---|---|---|
| receipt_id | INT | PK |
| supplier_id | INT | |
| dock_door | INT | |
| dock_arrival_ts | TEXT | |
| unload_complete_ts | TEXT | |
| count_complete_ts | TEXT | |
| putaway_complete_ts | TEXT | |
| expected_units | INT | |
| actual_units | INT | |
| worker_id | INT | FK → dim_workers |
Each hint you reveal reduces the XP you can earn. Try the query first.
Three sequential gaps to compute: arrival→unload, unload→count, count→putaway. Same trick as M5, repeated.
For each phase, EXTRACT(EPOCH FROM later_ts - earlier_ts) / 60 gives minutes; wrap in AVG().
Final shape is one row, three columns — the per-phase averages side by side.