Write a SQL query to track incident counts by site and week, including a rolling 4-week average and week-over-week change.
Use the provided sites, calendar_weeks, and incidents tables. Include every site for every listed week, including weeks with zero incidents. Week-over-week change means the current count minus the previous week's count.
Output
- One row per site and calendar week.
- Columns:
site_code, week_start, incident_count, rolling_4_week_avg, and week_over_week_change.
- Sort by
site_code, then week_start ascending. The first week's change for each site should be NULL.