← DoorDash Interview Insights

DoorDash·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

DoorDash data scientist interview with a SQL-heavy technical screen focused on delivery metrics. The question was applied and realistic, which I appreciated, but the follow-up tripped me up a bit.

Questions Asked (1)

Q1

Given an Orders table with expected and actual delivery dates, write a SQL query to find the percentage of orders delivered late in the last 30 days. Follow-up: which three customers had the most late deliveries in that same window?

Product Analytics & MetricsData Modeling
Author's notes

The main query was fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (e.g., late = actual_delivery_date > expected_delivery_date, last 30 days relative to today or max date). Then write a SQL query that filters orders in the last 30 days, calculates the percentage of late orders, and for the follow-up, aggregates late counts per customer and returns the top 3. Walk through the logic step-by-step, mentioning edge cases like NULL delivery dates and time zone considerations.

Pro tip: Mention that you would validate the metric by checking the distribution of delivery delays and ensure the 30-day window is based on order date, not delivery date, to avoid bias. Also, consider if 'late' should be defined with a grace period (e.g., > 1 hour) as per business rules.

1. Clarify requirements and schema

Ask clarifying questions about the table structure, definitions of 'late', and the reference date for 'last 30 days'. Confirm whether to use order date or delivery date for the window.

2. Write query for overall late percentage

Use a CASE statement to flag late orders, filter to the last 30 days, and compute the percentage as (sum of late flags / total orders) * 100. Use COUNT or AVG with appropriate casting.

3. Write query for top 3 customers with most late deliveries

Filter to the same 30-day window, group by customer_id, count late orders, order descending, and limit to 3. Join with customer table if names are needed.

4. Discuss edge cases and validation

Address NULL actual delivery dates (e.g., undelivered orders), time zones, and whether to include only completed orders. Suggest sanity checks like comparing with overall late rate.

Key Points to Mention

  • Definition of 'late': actual_delivery_date > expected_delivery_date, possibly with a grace period.
  • Time window: last 30 days based on order_date or delivery_date, and how to handle current date.
  • Handling NULLs: exclude orders with NULL actual_delivery_date or treat as not late.
  • SQL functions: CASE, COUNT, SUM, AVG, GROUP BY, ORDER BY, LIMIT, date functions (e.g., DATE_SUB, CURRENT_DATE).
  • Performance: indexing on date columns and customer_id for efficient filtering and grouping.
  • Business context: why late deliveries matter for DoorDash (customer satisfaction, operational metrics).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.