SQL · DoorDash · Medium
Write a SQL query that returns a single row of metrics about completed orders and their offer requests. The orders table has one row per order with order_id and status. The requests table has one row per offer request with request_id, order_id, requested_at, and offer_amount_cents. A completed order is any order whose status is 'completed'. Within each order, sort its requests by requested_at ascending, and use request_id ascending to break ties. An upward adjustment is an…
Checking your access…