BCG wants to monitor engagement across its internal digital products and analytics surfaces. Using a raw event log, calculate the number of unique users active during the trailing 30 calendar days for each date in the event range.
Write a PostgreSQL query that produces one row per calendar date from the minimum through maximum event date.
user_id only once within each 30-day window.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User who generated the event |
| event_timestamp | TIMESTAMP | Timestamp when the event occurred |
| event_type | VARCHAR(30) | Type of user event |