We currently have multiple service desk queues. I was wondering if any one has sql query that could break down the queues more down by person per queue.  The default templates are an combination of all.

OWNER_NAME specifies who closed the ticket

This query breaks it down by Queue

SELECT HD_QUEUE.NAME, count(HD_TICKET.ID) FROM ORG1.HD_TICKET
JOIN HD_QUEUE on HD_QUEUE.ID = HD_TICKET.HD_QUEUE_ID
WHERE CREATED > DATE_SUB(NOW(), INTERVAL 30 DAY)
GROUP BY HD_QUEUE_ID

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

0

Are you asking for ticket counts by queue, then by owner?  If so, this query should work for you.

SELECT HD_QUEUE.NAME, USER.USER_NAME, count(HD_TICKET.ID) 
FROM ORG1.HD_TICKET
JOIN HD_QUEUE on HD_QUEUE.ID = HD_TICKET.HD_QUEUE_ID
INNER JOIN USER ON USER.ID = HD_TICKET.OWNER_ID
WHERE HD_TICKET.CREATED > DATE_SUB(NOW(), INTERVAL 30 DAY)
GROUP BY HD_QUEUE_ID, USER.USER_NAME
ORDER BY HD_QUEUE_ID, USER.USER_NAME
Answered 03/18/2016 by: grayematter
Fourth Degree Black Belt

  • Yea great that's what I was looking for!
Please log in to comment

Answers

Answer this question or Comment on this question for clarity