Ticket Agent Analysis
Start Timer
0:00:00
The support team at your company is trying to analyze ticketing data to improve response times. They have noticed that a significant number of tickets have no assigned agent, making it difficult to track the progress of these tickets.
Write a SQL query to count the total number of tickets, the number of tickets assigned to agents, and the number of tickets that are not assigned to any agent.
Note: Tickets that are not assigned to any agent have NULL in their agent_id field.
Example:
Input:
tickets table
| Column | Type |
|---|---|
| id | INTEGER |
| issue | VARCHAR |
| agent_id | INTEGER |
| created_at | TIMESTAMP |
| updated_at | TIMESTAMP |
Output:
| Column | Type |
|---|---|
| total_tickets | INTEGER |
| tickets_with_agent | INTEGER |
| tickets_without_agent | INTEGER |
.
.
.
.
.
.
.
.
.
Comments