Doordash Data Manipulation (SQL/Python) Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Analyze Spending Patterns and Restaurant Performance Using SQL/Python
orders +-------------+---------+---------------+---------------------+ | delivery_id | user_id | restaurant_id | order_date | +-------------+...
Analyze Monthly Customer and Restaurant Spend Data
orders +-----------+-------------+---------------+------------+--------+ | order_id | customer_id | restaurant_id | order_date | amount | +----------...
Generate Weekly Revenue and Engagement Summary with Pandas
events | user_id | event_time | event_type | platform | revenue | |---------|---------------------|------------|----------|---------| | 101 ...
Measure Late Deliveries and Identify Top Delayed Restaurants
orders +----------+---------+--------------+---------------------+-------------------------+-----------------------+ | order_id | user_id | restaurant...
Write SQL for late-delivery metrics by window
You are given two tables. Assume PostgreSQL. Define delivery duration as delivered_at − pickup_time (exclude rows with null pickup_time or delivered_a...
Compute rolling cold-delivery rates with windows
Assume a food-delivery platform with the following schema. Use PostgreSQL. A delivery is considered "cold" if food_temp_c < 40 at dropoff OR there is ...
Write SQL for percent and window changes
Use PostgreSQL. Assume today = 2025-09-01. You must use CTEs and multiple window functions. Schema and tiny samples are below. Schema: - exposures(uni...
Model schema and query new-market readiness
Assume today is 2025-09-01. You are given (or can propose) a minimal schema to assess new-market readiness and early performance. Use the schema below...
Write SQL for cold-complaint diagnostics with LAG/QUALIFY
Using BigQuery/Snowflake-style SQL (CTEs required; use LAG and QUALIFY), answer the tasks below. Assume 'today' is 2025-09-01. Schema and small sample...
Refactor SQL into an aggregated report
You are given the following Postgres schema and small sample data for a food-delivery platform. Schema: - orders(order_id INT PRIMARY KEY, city TEXT, ...
Write SQL to backtest refund policy
Using the schema and samples below, write a single SQL query (CTEs allowed) that does all of the following for the last 30 days relative to today = 20...
Write complex SQL on DoorDash data
You are given the following BigQuery-style schema and tiny samples (assume timestamps are UTC; assume promotions.discount_amount is the applied discou...
Solve multi-part SQL with sliding windows
Assume 'today' is 2025-09-01. You are given the following tables. users(user_id INT PRIMARY KEY, signup_date DATE) orders(order_id INT PRIMARY KEY, us...
Write SQL for cuisine median delivery times
Use SQL to answer the following. Assume ANSI SQL with window functions and percentile functions available. Treat “today” as 2025-09-01 (inclusive). Co...
Compute dasher payout from API data
Given a REST endpoint GET /payout that returns each delivery’s components (base pay, distance/time bonuses, promotions, tips, fees, adjustments, taxes...
Implement a gig worker payout calculator
Implement a payout calculator for gig workers (e.g., delivery drivers). Given a list of completed orders with timestamps, distances, and tips, plus po...
Compute dasher pay from deliveries
Given a list of delivery events for dashers (e.g., dasherId, pickupTime, dropoffTime, distance, tip, and optional bonuses) and a set of pay rules (e.g...
Compute courier pay with peak-hour rules
Implement compute_pay(deliveries) to calculate a delivery driver's daily pay from a list of delivery records. Each record may include times, miles, ba...
Calculate Late Delivery Percentage and Top Customers
Orders +-----------+-------------+------------------------+------------------------+ | order_id | customer_id | expected_delivery_date | actual_deliv...
Analyze Order Spending Patterns Across Cities Using SQL
Orders order_id | user_id | order_date | city | order_value 1 | 101 | 2023-01-03 | LA | 23.50 2 | 102 | 2023-01-04 | NY | 45.00 3 | 101 | 2023-01-10 |...