Longest Order Streaks of 2025
HardDescription
A streak is a run of consecutive days on which the shop had at least one order. Find the streaks in 2025 that last 4 days or more, and show:
run_start: the first day of the streakrun_end: the last daydays: how many days it lasts
End your query with ORDER BY days DESC, run_start.
Tables
| orders |
|---|
| order_id (PK) |
| customer_id (FK) |
| order_date |
| status |
| total_amount |
| shipping_city |