SQL · DoorDash · Medium
Analyze three restaurant-delivery tables and return one summary row per cuisine. Measure delivery duration for two recent UTC time windows, compute a median for each window, and report how the recent median compares with the preceding median. A qualifying delivery must meet all of these conditions: orders.status = 'completed' deliveries.pickup_time is not null deliveries.dropoff_time is not null deliveries.distance_miles < 10 restaurants.is_ghost_kitchen = FALSE Assign each…
Checking your access…