How to calculate Ticket Backlog
Ticket backlog is the number of support tickets that are open and unresolved at a point in time.
Formula
Backlog at date D = tickets created on or before D that were not resolved by DSQL query
This example assumes: tickets(id, created_at, resolved_at, priority). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT d::date AS day,
COUNT(t.id) AS open_tickets
FROM GENERATE_SERIES(CURRENT_DATE - 30, CURRENT_DATE, INTERVAL '1 day') AS d
LEFT JOIN tickets t
ON t.created_at <= d + INTERVAL '1 day'
AND (t.resolved_at IS NULL OR t.resolved_at > d + INTERVAL '1 day')
GROUP BY 1
ORDER BY 1;Common mistakes that make Ticket Backlog wrong
- Counting only today's open status loses the history; rebuild backlog from created and resolved dates.
- Tickets waiting on the customer inflate backlog without being the team's workload.
- Duplicate tickets for one issue count more than once.
Ask for Ticket Backlog in plain English
Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.
- How has our open ticket backlog changed over the last 30 days?
- How many high-priority tickets are older than 3 days?