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

Find Monthly Top Customers Excluding High-Frequency Users

Last updated: Aug 7, 2026

Quick Overview

A PostgreSQL interview problem about ranking monthly customers while excluding users who meet a high-frequency threshold. Candidates must build the eligible population correctly, aggregate orders, apply deterministic ranking, and handle ties explicitly.

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

Find Monthly Top Customers Excluding High-Frequency Users

Company: DoorDash

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Technical Screen

# Find Monthly Top Customers Excluding High-Frequency Users 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 For each calendar month, exclude customers with more than 30 deliveries in that month. Among the remaining customers, return every customer tied for the highest delivery count. ## Required Output Return order_month, customer_id, and delivery_count. Sort by month ascending and customer ID ascending. ## Constraints - High-frequency status is evaluated independently each month. - Return all ties. - Months with no remaining customer produce no row. ```hint Rank after filtering Count each customer-month, remove counts above 30, then use a tie-preserving rank within month. ```

Quick Answer: A PostgreSQL interview problem about ranking monthly customers while excluding users who meet a high-frequency threshold. Candidates must build the eligible population correctly, aggregate orders, apply deterministic ranking, and handle ties explicitly.

Related Interview Questions

  • Measure Customers Ordering from Bottom-Quartile Restaurants - DoorDash (easy)
  • Calculate the Monthly Share of High-Frequency Customers - 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

Find Monthly Top Customers Excluding High-Frequency Users

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

Find Monthly Top Customers Excluding High-Frequency Users

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

For each calendar month, exclude customers with more than 30 deliveries in that month. Among the remaining customers, return every customer tied for the highest delivery count.

Required Output

Return order_month, customer_id, and delivery_count. Sort by month ascending and customer ID ascending.

Constraints

  • High-frequency status is evaluated independently each month.
  • Return all ties.
  • Months with no remaining customer produce no row.
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.