Your question is Write a SQL 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.
Write a SQL query to retrieve specific user engagement data from a relational database schema.
Use the provided users and engagement_events tables. Consider only engagement events in 2025, while retaining users who have no qualifying events.
user_id, display_name, engagement_count, total_engagement_minutes, and last_engagement_date.total_engagement_minutes descending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| display_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique engagement event identifier |
| user_id | INT | User associated with the event |
| engagement_type | VARCHAR(50) | Type of engagement event |
| engagement_date | DATE | Date of the engagement event |
| duration_minutes | INT | Engagement duration in minutes |