To minimize Dasher frustration and improve delivery speed, DoorDash tracks the time a courier spends waiting at a merchant.
Write an SQL query to find the average wait time in minutes for each restaurant.
| restaurant_id(INTEGER) | courier_arrival_time(TIMESTAMP) | order_ready_time(TIMESTAMP) |
|---|---|---|
| 10 | 2026-02-13 12:00:00 | 2026-02-13 12:15:00 |
| 10 | 2026-02-13 12:30:00 | 2026-02-13 12:40:00 |
| 11 | 2026-02-13 13:00:00 | 2026-02-13 13:04:00 |
| 12 | 2026-02-13 14:00:00 | 2026-02-13 14:20:00 |
| 12 | 2026-02-13 14:30:00 | 2026-02-13 14:32:00 |
| 10 | 2026-02-13 15:00:00 | 2026-02-13 14:55:00 |
| restaurant_id(INTEGER) | avg_wait_minutes(DECIMAL) |
|---|---|
| 10 | 12.5 |
| 12 | 11 |