Cisco monitors ad engagement across its digital advertising surfaces. Given ad event data, write a PostgreSQL query that calculates each user's rolling 7-day click-through rate by event date.
NULL when the rolling impression count is zero.user_id and event_date.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique ad event identifier |
| user_id | INT | Cisco user identifier |
| event_ts | TIMESTAMPTZ | Timestamp at which the ad event occurred |
| event_type | VARCHAR(20) | Event classification, such as click or impression |