Revenue in the Last 30 Days
HardDescription
Use only delivered orders placed from 1 July to 30 September 2025. Make one row per
order_date that has such orders, with day_revenue (that day's total total_amount). Then show
order_date, day_revenue and last_30_days: the revenue of that day plus the 29 calendar days
before it.
End your query with ORDER BY order_date.
Tables
| orders |
|---|
| order_id (PK) |
| order_date |
| status |
| total_amount |