Your question is Window Functions for Ranking. 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.
Whova wants to identify the most engaged attendees during a conference and monitor how their engagement accumulates across event dates. Write a PostgreSQL query using multiple CTEs and window functions.
SUM() OVER.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique Whova attendee identifier |
| full_name | VARCHAR(100) | Attendee display name |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique conference event identifier |
| event_name | VARCHAR(150) | Name of the conference session or activity |
| event_date | DATE | Calendar date of the event |
| Column | Type | Description |
|---|---|---|
| engagement_idPK | INTEGER | Unique engagement record identifier |
| user_id | INTEGER | References whova_users.user_id |
| event_id | INTEGER | References conference_events.event_id |
| engagement_type | VARCHAR(40) | Type of attendee interaction |
| points | INTEGER | Points assigned to the interaction |