Back to problems

Bottom Quartile Reach

SQL · DoorDash · Easy

You have a table called orders that records every order placed on a food-delivery platform. Table: orders order_id is the primary key. Each row corresponds to a single order made by a customer at a restaurant. We want to understand the reach of the least active restaurants. Specifically, find the distinct customer reach for restaurants that fall into the bottom quartile when ranked by total order count. Here’s how to define the bottom quartile: Use NTILE(4) over the…

Checking your access…