NJM Insurance Group wants to identify which departments handled the most calls during the previous calendar quarter. Write a PostgreSQL query that ranks departments by the number of calls received in that period.
department_name and call_volume.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | NJM department name |
| Column | Type | Description |
|---|---|---|
| call_idPK | INT | Unique call identifier |
| department_id | INT | Department handling the call |
| started_at | TIMESTAMP | Call start timestamp |
| call_type | VARCHAR(50) | Type of customer call |
| channel | VARCHAR(30) | Call intake channel |
| status | VARCHAR(30) | Call status |