Describe a time you had to optimize a slow SQL query or a data-heavy backend process.
Using the supplied schema, write a PostgreSQL query that returns recent activity totals for active accounts. The result must include active accounts with no matching activity and should restrict activity to the first quarter of 2025.
account_id, account_name, and event_count.event_count descending, then account_id ascending.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_name | VARCHAR(100) | Display name of the account |
| status | VARCHAR(20) | Account status |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique activity event identifier |
| account_id | INT | Account associated with the event |
| event_type | VARCHAR(30) | Type of activity recorded |
| occurred_at | TIMESTAMP | Timestamp when the event occurred |