TEKsystems wants to identify the most engaged users of its internal activity platform each month. Write a PostgreSQL query that counts valid user activity records and returns the top five users for every calendar month.
user_activity to users using user_id.user_id as a deterministic tie-breaker, and return no more than five users per month.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| team_name | VARCHAR(100) | TEKsystems team assignment |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INTEGER | Unique activity record identifier |
| user_id | INTEGER | User associated with the activity |
| activity_at | TIMESTAMP | Timestamp when the activity occurred |
| activity_type | VARCHAR(50) | Type of platform activity |