Expedia wants to measure the "Customer Frustration Index." A critical threshold for frustration is a delay exceeding 4 hours.
Write an SQL query to find the total number of unique users affected by such delays and the average delay they experienced.
| flight_id(INTEGER) | scheduled_departure(TIMESTAMP) | actual_departure(TIMESTAMP) |
|---|---|---|
| 1 | 2026-02-13 10:00:00 | 2026-02-13 15:00:00 |
| 2 | 2026-02-13 11:00:00 | 2026-02-13 12:00:00 |
| 3 | 2026-02-13 14:00:00 | 2026-02-13 19:30:00 |
| 4 | 2026-02-13 20:00:00 | 2026-02-14 01:00:00 |
| 5 | 2026-02-13 08:00:00 | 2026-02-13 08:15:00 |
| flight_id(INTEGER) | user_id(INTEGER) |
|---|---|
| 1 | 501 |
| 1 | 502 |
| 3 | 503 |
| 3 | 504 |
| 4 | 505 |
| 4 | 501 |
| 2 | 506 |
| affected_user_count(INTEGER) | average_delay_hours(DECIMAL) |
|---|---|
| 5 | 5.17 |