Given a table of daily user logins and ad impressions, calculate the 7-day rolling average of impressions per active user.
Treat NULL ad impressions as zero. A day with zero active users has a NULL daily ratio and is excluded from the average, while remaining in the output.
activity_date, active_users, ad_impressions, impressions_per_active_user, and rolling_7_day_avgactivity_date ascending.| Column | Type | Description |
|---|---|---|
| activity_datePK | DATE | Reporting date |
| active_users | INT | Number of users who logged in that day |
| ad_impressions | INT | Total ad impressions recorded that day |