Deliveroo’s operations team wants to monitor daily completed order volume without losing dates that had no completed orders. Write a PostgreSQL query that returns the daily order count and its rolling seven-day average.
status = 'completed' and a matching restaurant.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| restaurant_id | INT | Restaurant associated with the order |
| order_date | DATE | Date the order was placed |
| status | VARCHAR(20) | Current order status |
| Column | Type | Description |
|---|---|---|
| restaurant_idPK | INT | Unique restaurant identifier |
| restaurant_name | VARCHAR(100) | Restaurant name |
| city | VARCHAR(80) | Restaurant city |