Write a SQL query using window functions to calculate a 7-day rolling average of daily website visits.
Use the website_visits table. Multiple rows may exist for the same date, and dates without records should be treated as zero visits. Include every calendar date from the minimum through maximum recorded date.
visit_date, daily_visits, and rolling_averagevisit_date ascending| Column | Type | Description |
|---|---|---|
| visit_idPK | INT | Unique source record identifier |
| visit_date | DATE | Date associated with the website visit count |
| visits | INT | Number of visits recorded for the date |