Write a SQL query using window functions to calculate the 7-day rolling average of order volume per user.
Use the provided users and orders data. Include every user for every calendar date between the earliest and latest order dates, treating days without orders as zero volume.
user_id, order_date, order_volume, and rolling_7_day_avg.user_id, then order_date ascending.user_id is NULL from volume counts.rolling_7_day_avg as the average of the current date and preceding 6 calendar days, including zero-volume days.rolling_7_day_avg to 2 decimal places.order_volume as an integer.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| user_id | INT | User who placed the order |
| order_date | DATE | Calendar date when the order was placed |