Write a SQL query to join support tickets, agents, and shifts to calculate average handle time and backlog by team at Clipboard.
Use resolved tickets to calculate handle time in minutes. Count tickets with open or pending status as backlog, and exclude tickets without a matching agent or shift.
Output
- One row per team with
team, average_handle_time_minutes, and backlog_count.
- Include teams with no qualifying tickets, showing zero backlog and a null average.
- Round average handle time to two decimals and order by
team ascending.