SQL · DoorDash · Hard
You are working in PostgreSQL against two tables. exposures records, per unit_id and calendar day dt, an assignment flag condition_label (1 = treatment, 0 = control). orders records one row per order: order_id, unit_id, dt, courier_type, temp_category, subtotal_cents. Treat 2025-09-01 as "today", and answer the four requests below for the inclusive seven-day window 2025-08-26 through 2025-09-01. Every query must be written with CTEs and must exploit multiple window…
Checking your access…