For a case study, consider multiple factors affecting DoorDash USA and come up with a reliable solution. How would you test the solution, including using SQL with datetime functions and window functions?
Use the supplied DoorDash USA delivery data to produce a validation-oriented delivery report for January 2025.
Output
- One row per completed delivery requested in January 2025.
- Return
delivery_id, market, dasher_id, merchant_name, delivery_minutes, prior_delivery_minutes, duration_change_minutes, and reliability_flag.
- Flag missing or negative durations, durations over 60 minutes, and durations more than twice the Dasher's previous delivery as
review; otherwise use reliable.
- Order by
requested_at, then delivery_id.