PracHub
QuestionsLearningGuidesInterview Prep
|Home/Data Manipulation (SQL/Python)/DoorDash

Calculate the Monthly Share of High-Frequency Customers

Last updated: Aug 7, 2026

Quick Overview

A PostgreSQL interview problem about measuring the monthly percentage of customers who place more than 30 deliveries. It tests calendar-month aggregation, distinct-customer denominators, threshold logic, and precise percentage calculation.

  • easy
  • DoorDash
  • Data Manipulation (SQL/Python)
  • Data Scientist

Calculate the Monthly Share of High-Frequency Customers

Company: DoorDash

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Technical Screen

# Calculate the Monthly Share of High-Frequency Customers Write one PostgreSQL SELECT statement or CTE query. Do not create, alter, or modify tables. ## Schema delivery_orders | column | type | description | |---|---|---| | delivery_id | integer | Unique delivery | | order_place_time | timestamp | Order placement time | | customer_id | integer | Customer | | restaurant_id | integer | Restaurant | | dasher_id | integer | Courier | ## Task A high-frequency customer places more than 30 deliveries in a calendar month. For every month, calculate the percentage of distinct customers who ordered that month and were high frequency in that same month. ## Required Output Return order_month as a date, monthly_customers, high_frequency_customers, and high_frequency_pct rounded to two decimal places. Sort by month ascending. ## Constraints - Count deliveries, not days. - A customer can be high frequency in one month and not another. - The denominator includes every distinct customer with at least one delivery that month. ```hint Aggregate customer-months first Create one row per month and customer with an order count, then aggregate the high-frequency flag. ```

Quick Answer: A PostgreSQL interview problem about measuring the monthly percentage of customers who place more than 30 deliveries. It tests calendar-month aggregation, distinct-customer denominators, threshold logic, and precise percentage calculation.

Related Interview Questions

  • Measure Customers Ordering from Bottom-Quartile Restaurants - DoorDash (easy)
  • Find Monthly Top Customers Excluding High-Frequency Users - DoorDash (easy)
  • Calculate Monthly Restaurant Sales Growth - DoorDash (easy)
  • Measure Daily Late-Order Rates by Delivery Zone - DoorDash (medium)
|Home/Data Manipulation (SQL/Python)/DoorDash

Calculate the Monthly Share of High-Frequency Customers

DoorDash logo
DoorDash
Jul 27, 2026, 12:00 AM
easyData ScientistTechnical ScreenData Manipulation (SQL/Python)
1
0

Calculate the Monthly Share of High-Frequency Customers

Write one PostgreSQL SELECT statement or CTE query. Do not create, alter, or modify tables.

Schema

delivery_orders

columntypedescription
delivery_idintegerUnique delivery
order_place_timetimestampOrder placement time
customer_idintegerCustomer
restaurant_idintegerRestaurant
dasher_idintegerCourier

Task

A high-frequency customer places more than 30 deliveries in a calendar month. For every month, calculate the percentage of distinct customers who ordered that month and were high frequency in that same month.

Required Output

Return order_month as a date, monthly_customers, high_frequency_customers, and high_frequency_pct rounded to two decimal places. Sort by month ascending.

Constraints

  • Count deliveries, not days.
  • A customer can be high frequency in one month and not another.
  • The denominator includes every distinct customer with at least one delivery that month.
Loading comments...

Browse More Questions

More Data Manipulation (SQL/Python)•More DoorDash•More Data Scientist•DoorDash Data Scientist•DoorDash Data Manipulation (SQL/Python)•Data Scientist Data Manipulation (SQL/Python)

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.