Can you write a SQL query to extract specific user engagement metrics from a database for ABC Education?
Using the users and engagement_events tables, return metrics for every user, including users with no engagement records.
user_id, full_name, total_events, active_days, lessons_completed, and last_engagement_at.total_events descending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| full_name | VARCHAR(120) | User's display name |
| status | VARCHAR(20) | Current account status |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique engagement event identifier |
| user_id | INT | User associated with the event |
| event_type | VARCHAR(40) | Type of engagement event |
| engaged_at | TIMESTAMP | Timestamp when the event occurred |
| lesson_id | INT | Lesson associated with the event, when applicable |