Your question is Top Power Users Query. Start with the requirements and the two 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.
The TELUS Digital AI Community wants to identify its most active contributors for the completed second quarter of 2025. Write a PostgreSQL query that ranks users by the number of activity events recorded during Q2 2025 and returns the top 10%.
2025-04-01 through 2025-06-30, inclusive.user_id as a deterministic tie-breaker.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| display_name | VARCHAR(100) | User's display name |
| VARCHAR(255) | User email address | |
| joined_at | DATE | Date the user joined |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique activity event identifier |
| user_id | INTEGER | User associated with the event |
| event_type | VARCHAR(50) | Type of activity performed |
| occurred_at | TIMESTAMP | Timestamp when the activity occurred |