DoorDash·Data Scientist·Technical Phone Screen
- For each calendar month, what percentage of that month's total orders were placed by high-frequency customers, defined as customers who placed more than 30 orders in that month?
- Excluding high-frequency customers, find the top spender for each month by total order value. If multiple customers tie for the top, return all of them.
- Compute the month-over-month change in total sales for a specific restaurant, then generalize the same logic to every restaurant.
- Given a query that computes the percentage of customers ordering from bottom-30%-by-sales restaurants, explain what the query does line by line, then rewrite it to produce that percentage broken out per month.
“This one is mostly mechanical once you realize you need two layers: first aggregate per (month, customer) to find who clears the 30-order threshold, then join that back to get their share of total orders.”