Your question is SQL for Activity and User Metrics. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
ZoomInfo Technologies wants a daily view of activity volume in ZoomInfo Engage. Write a PostgreSQL query that reports activity and distinct-user counts by reportable activity type and calendar date.
2025-01-01 through 2025-01-04, inclusive.NULL for the first date because no prior date exists.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique ZoomInfo Engage user identifier |
| full_name | VARCHAR(100) | User's display name |
| Column | Type | Description |
|---|---|---|
| activity_type_idPK | INT | Unique activity type identifier |
| activity_type | VARCHAR(80) | Name of the activity type |
| is_reportable | BOOLEAN | Indicates whether the type appears in reporting |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity identifier |
| activity_type_id | INT | Referenced activity type |
| user_id | INT | User who performed the activity |
| activity_timestamp | TIMESTAMP | Timestamp when the activity occurred |