Is it possible to run a report showing the top 5-10 ticket categories that have been chosen and the number of tickets for each one?

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

The following will give you ticket counts, sorted by queue then category.

SELECT HD_QUEUE.NAME as 'Queue',
HD_CATEGORY.NAME as 'Category',
count(HD_TICKET.id) as 'Count'
FROM HD_QUEUE
INNER JOIN (HD_TICKET
INNER JOIN HD_CATEGORY ON HD_TICKET.HD_CATEGORY_ID = HD_CATEGORY.ID)
ON HD_QUEUE.ID = HD_TICKET.HD_QUEUE_ID
Group BY HD_QUEUE.NAME, HD_CATEGORY.NAME
ORDER BY HD_QUEUE.NAME, HD_CATEGORY.NAME;

If you are looking for a single queue, you can add that as a where condition.

For the top 5 from any queue, you would change the order by to

order by count(HD_TICKET.id) desc limit 5

Getting the data you are seeking will depend on exactly how your Service Desk module is configured.

Answered 10/04/2013 by: grayematter
Fourth Degree Black Belt

  • Thank you very much, this is exactly what I needed
Please log in to comment
Answer this question or Comment on this question for clarity