Your question is SQL Summary of Meeting Engagement. Start with the requirements and the four 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 analysts need an event-level view of attendee engagement across published events. Write a PostgreSQL query that includes events with no registrations and separates results by attendee segment.
No registrations, and sort by event date, event name, and segment.Only registrations with registration_status = 'registered' should be included. Use 0 for metrics that cannot be calculated because no attendance exists.
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique Whova event identifier |
| event_name | VARCHAR(150) | Event name |
| event_date | DATE | Scheduled event date |
| status | VARCHAR(20) | Publication status |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| segment | VARCHAR(30) | Business or attendee segment |
| Column | Type | Description |
|---|---|---|
| registration_idPK | INT | Unique registration identifier |
| event_id | INT | Registered event identifier |
| user_id | INT | Registered user identifier |
| registration_status | VARCHAR(20) | Registration state |
| Column | Type | Description |
|---|---|---|
| attendance_idPK | INT | Unique attendance record identifier |
| registration_id | INT | Registration associated with the session |
| session_name | VARCHAR(100) | Attended meeting or session |
| minutes_attended | INT | Minutes attended in the session |