DoorDash·Data Scientist·Take-home Assignment
Jun 2026
DoorDash data science take-home that was way heavier on SQL than I expected. Four problems, all PostgreSQL, all requiring CTEs and window functions, and the schema was deceptively simple but the logic got gnarly fast.
- Given an exposures table and an orders table, compute the percentage of orders in a 7-day window that satisfy a compound filter (biker courier, cold temp category, subtotal at least 2000 cents) under two denominator definitions: one counting only orders tied to treatment-exposed units on that day, and one counting all orders regardless of exposure status.
- Define a 'power day' for each unit-date as: at least 2 biker-cold orders in the trailing 7 days AND average subtotal on those orders is at least 2000 cents. What percentage of unit-days are power days under the same two denominator conventions?
- Build a complete unit-day grid (including days with zero orders) for a 7-day window. For each unit and date, compute daily order count, cumulative orders, a 7-day rolling sum, day-over-day percent change, and a non-overlapping 7-day percent change using specific window frame definitions.
- For each unit, identify dates where a boolean flag (whether a qualifying high-value biker-cold order exists that day) flips value. For each flip, return the unit, the date, the direction of change, the difference in 7-day rolling order counts before and after the flip, and the percent rank of that delta across all flip events.
“The two-denominator thing tripped me up more than I want to admit.” The rest of the author's notes on Data Scientist interview at DoorDash, Take-home Assignment round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post