Hotstar wants to identify the most active users during a live sports stream. Activity is measured using watch minutes and engagement actions such as chats and reactions.
Write a PostgreSQL query to return the top 3 active users for the live event with event_id = 101.
activity_score, where each engagement contributes 5 points.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Hotstar user identifier |
| display_name | VARCHAR(100) | User profile display name |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique live event identifier |
| event_name | VARCHAR(150) | Name of the sports event |
| is_live | BOOLEAN | Whether the event is currently live |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity record identifier |
| event_id | INT | Referenced live event |
| user_id | INT | Referenced user, nullable for invalid activity records |
| activity_type | VARCHAR(20) | WATCH, CHAT, or REACTION activity |
| metric_value | INT | Watch minutes, or NULL for engagement activities |