Service Desk Queues breakdown by owner
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
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
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
grayematter
8 years ago
Top Answer
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
Comments:
-
Yea great that's what I was looking for! - tsbb2015 8 years ago