← DoorDash Interview Insights

DoorDash·Software Engineer·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Analytics Engineer round at DoorDash that was basically one long deep-dive into a single fitness app scenario. They started with data modeling and just kept pulling the thread from there, metrics definitions, SQL, window functions, the whole chain.

Questions Asked (4)

Q1

Design the data model for a fitness app covering entities like users, workouts, workout sessions, devices, and subscriptions.

Data ModelingSystem Design
Author's notes

Started okay, got the core tables down pretty fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core requirements and access patterns (e.g., how workouts are logged, how sessions relate to workouts, how devices sync data, and how subscriptions gate features). Then propose a normalized relational schema with clear entities, relationships, and indexes, and discuss trade-offs for scalability and read-heavy queries.

Pro tip: Anchor your design around the most frequent queries (e.g., fetching a user's recent workout sessions or active subscription status) and explicitly call out indexing and denormalization choices to show you optimize for real-world performance, not just theoretical purity.

1. Clarify requirements and access patterns

Ask about expected scale, read/write ratios, and key user flows (e.g., logging a workout, viewing history, syncing devices, checking subscription). This ensures the model supports actual use cases.

2. Identify core entities and relationships

Define Users, Workouts (templates/plans), Workout Sessions (instances), Devices, and Subscriptions. Map cardinalities: one user to many sessions, one workout to many sessions, one user to many devices, one user to many subscriptions (or one active).

3. Design tables with keys and attributes

For each entity, specify primary keys, foreign keys, and essential fields (e.g., session start/end time, device type, subscription status). Use junction tables for many-to-many if needed (e.g., workout-session exercises).

4. Address indexing, denormalization, and scalability

Propose indexes on foreign keys and frequent query columns (e.g., user_id + session_date). Discuss when to denormalize (e.g., storing workout name in session for faster reads) and how to partition large tables (e.g., by user_id or date).

5. Discuss trade-offs and extensions

Compare SQL vs NoSQL, mention soft deletes, audit fields, and how to handle evolving schemas. Also touch on data consistency for device sync and subscription billing events.

Key Points to Mention

  • Normalization vs denormalization: start normalized, denormalize for read-heavy paths like session history.
  • Indexing strategy: composite indexes on (user_id, start_time) for session queries, and on device_id for sync lookups.
  • Handling many-to-many relationships: e.g., a workout session can include multiple exercises, requiring a junction table.
  • Subscription modeling: separate table with status, plan type, and billing period; consider history for auditing.
  • Device management: store device tokens, last sync timestamp, and platform; support multiple devices per user.
  • Scalability considerations: sharding by user_id, using time-series optimizations for sessions, and caching active subscriptions.

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

Q2

Define DAU for a fitness app. Which user event counts as 'active', how do you handle deduplication within the window, and how do you deal with time zones?

Product Analytics & MetricsAdaptability & Ambiguity
Author's notes

This is where the interview got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business goal of DAU for a fitness app, then propose a primary active event (e.g., completing a workout) and justify it. Explain deduplication by user ID per day and address time zones by defining a canonical time zone (e.g., UTC) or user-local day, and describe how to handle edge cases.

Pro tip: Mention that DAU should align with the product's north star metric and that you'd validate the definition with stakeholders to ensure it drives the right behavior. Also, note that using user-local time zones can be more accurate for engagement but may complicate aggregation; choose based on business needs.

1. Clarify the purpose of DAU

Ask what decisions DAU will inform (e.g., engagement tracking, feature adoption) to tailor the definition. This shows you understand the metric's role in product analytics.

2. Define the active event

Propose a core action that indicates meaningful engagement, such as logging a workout, tracking a meal, or opening the app and viewing a workout plan. Justify why this event best represents active use.

3. Handle deduplication

Explain that you count unique users per day, so multiple events by the same user count once. Use a unique user identifier (e.g., user_id) and deduplicate within the day's window.

4. Address time zones

Decide on a time zone convention: either a fixed time zone (e.g., UTC) for consistency or user-local time for accuracy. Describe how to handle users who travel or have events spanning midnight.

5. Consider edge cases and validation

Discuss handling of bots, inactive accounts, or multiple devices. Suggest validating the metric against business goals and iterating if needed.

Key Points to Mention

  • Definition of 'active' should align with business goals (e.g., workout completion vs. app open).
  • Deduplication: count unique users per day using user ID, not events.
  • Time zone handling: choose between UTC or user-local time, and document the choice.
  • Edge cases: users in multiple time zones, events at midnight, and data pipeline implications.
  • Validation: compare DAU with other metrics (e.g., WAU, MAU) and ensure it reflects true engagement.
  • Communication: explain trade-offs and get stakeholder buy-in.

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

Q3

Given your proposed schema, write a SQL query that returns DAU per day for the last 30 days.

Product Analytics & MetricsData Modeling
Author's notes

Pretty mechanical once the schema was settled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions: what table(s) store user activity, how to identify a daily active user, and whether 'last 30 days' includes today. Then write a query that filters events to the last 30 days, groups by date, and counts distinct users per day, handling time zones and date boundaries explicitly.

Pro tip: Mention that DAU should be computed from a deduplicated event stream and that using a date_trunc or calendar table avoids off-by-one errors; also note that for large-scale systems, pre-aggregating daily active users is often necessary for performance.

1. Clarify schema and definitions

Confirm which table contains user activity, the timestamp column, and how a user is identified. Define 'active' (e.g., any event, login, order) and whether the last 30 days includes today.

2. Filter to the last 30 days

Use a WHERE clause on the event timestamp to restrict to the last 30 days, being explicit about time zone and inclusive/exclusive boundaries.

3. Group by day and count distinct users

Truncate the timestamp to the day (e.g., DATE(ts) or date_trunc('day', ts)) and count distinct user IDs per day.

4. Handle missing days (optional)

If the business requires a row for every day even with zero DAU, left join against a calendar table or generate a date series.

5. Write and explain the final query

Present the SQL clearly, annotate key parts, and mention assumptions (e.g., time zone, definition of active).

Key Points to Mention

  • Definition of an active user (e.g., any event, specific action like order placed)
  • Time zone handling and date boundaries (inclusive/exclusive)
  • Using COUNT(DISTINCT user_id) to avoid double-counting
  • Performance considerations: indexing on timestamp, pre-aggregation, or partitioning
  • Handling days with zero active users (calendar table or date series)
  • Assumptions about the schema (table name, column names, user identifier)

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

Q4

Extend your approach to compute rolling WAU and MAU, build a retention curve, and calculate stickiness (DAU/MAU). Use window functions where appropriate.

Product Analytics & MetricsA/B Testing & Experimentation
Author's notes

The window function part I was ready for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the event schema and defining active users, then use window functions to compute rolling DAU, WAU, and MAU over time. For retention, build a cohort-based retention curve using first activity date and subsequent activity periods, and calculate stickiness as DAU/MAU ratio.

Pro tip: Mention that for large-scale data, approximate distinct counts (e.g., HyperLogLog) or pre-aggregated tables are often used to keep queries efficient, and that stickiness should be interpreted alongside retention to avoid misleading conclusions.

1. Define metrics and event schema

Clarify what constitutes an active user (e.g., login, order, app open) and identify the relevant event table with user_id and timestamp. Define DAU, WAU, and MAU as distinct active users in a day, 7-day, and 30-day window respectively.

2. Compute rolling DAU, WAU, MAU with window functions

Use window functions like COUNT(DISTINCT user_id) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) for WAU, and 29 PRECEDING for MAU. Ensure the window is based on calendar days, not rows, to handle missing dates.

3. Build retention curve using cohorts

Assign each user a cohort based on their first activity date. For each subsequent period (e.g., day, week), compute the percentage of cohort users who return. Use a self-join or window functions to track retention over time.

4. Calculate stickiness (DAU/MAU)

Compute the ratio of daily active users to monthly active users for each day. This metric indicates how frequently users engage; a higher ratio means more habitual usage.

5. Validate and interpret results

Check for data quality issues (e.g., timezone, bot traffic) and ensure metrics align with business definitions. Interpret trends and compare against benchmarks or A/B test results.

Key Points to Mention

  • Use of window functions with ROWS BETWEEN for rolling metrics, and handling missing dates via calendar table or date spine.
  • Cohort-based retention analysis: define cohort by first activity date and track retention over subsequent periods.
  • Stickiness as DAU/MAU ratio, and its interpretation as a measure of user engagement frequency.
  • Performance considerations: approximate distinct counts (HyperLogLog) or pre-aggregation for large datasets.
  • Time zone and definition consistency: ensure all metrics use the same time zone and active user definition.
  • Potential pitfalls: double-counting users across periods, and the need to deduplicate before counting.

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