TransUnion CreditVision needs a monthly engagement metric showing how many eligible users interacted with the product. The source contains both user account status and timestamped product events.
Write a PostgreSQL query to calculate monthly active users from the events table.
account_status is active.login, report_view, and score_check as active events. Exclude other event types and rows with a NULL event name.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| account_status | VARCHAR(20) | Current account status |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique event identifier |
| user_id | INTEGER | User who generated the event |
| occurred_at | TIMESTAMP | Timestamp when the event occurred |
| event_name | VARCHAR(30) | Type of product event |