Tickets opened by user by Category
Has anyone compiled such a beast? I am looking to see the number of tickets my employees open by category on a monthly basis
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
scottlutz
12 years ago
[font="times new roman"]You can build most of this via the wizard, and then just subbing in the date routine:
DATE_SUB(NOW(), INTERVAL 31 DAY)
Here is a sample based on the Default K1000 Service Desk Queue to get you going, though if you want this across all the Queues, you will have to build something quite different.
SELECT
S.FULL_NAME AS SUBMITTER_NAME,
HD_CATEGORY.NAME AS CATEGORY
FROM HD_TICKET
LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID)
JOIN HD_CATEGORY
ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1)
AND (HD_TICKET.CREATED > DATE_SUB(NOW(), INTERVAL 31 DAY) )
ORDER BY SUBMITTER_NAME
DATE_SUB(NOW(), INTERVAL 31 DAY)
Here is a sample based on the Default K1000 Service Desk Queue to get you going, though if you want this across all the Queues, you will have to build something quite different.
SELECT
S.FULL_NAME AS SUBMITTER_NAME,
HD_CATEGORY.NAME AS CATEGORY
FROM HD_TICKET
LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID)
JOIN HD_CATEGORY
ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1)
AND (HD_TICKET.CREATED > DATE_SUB(NOW(), INTERVAL 31 DAY) )
ORDER BY SUBMITTER_NAME
Posted by:
James@Grow
12 years ago
Posted by:
James@Grow
12 years ago
Posted by:
scottlutz
12 years ago
Posted by:
James@Grow
12 years ago
Posted by:
James@Grow
12 years ago
I think we figured it out:
SELECT U2.FULL_NAME, HD_C.NAME AS 'TICKET_TYPE', COUNT(HD_C.NAME) AS 'TICKET_COUNT'
FROM HD_TICKET HD_T
INNER JOIN USER U2 ON U2.ID = HD_T.OWNER_ID
INNER JOIN HD_CATEGORY HD_C ON HD_C.ID = HD_T.HD_CATEGORY_ID
WHERE HD_T.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 31 DAY)
AND HD_T.OWNER_ID <> 0
GROUP BY FULL_NAME, TICKET_TYPE
ORDER BY FULL_NAME, TICKET_TYPE ASC;
SELECT U2.FULL_NAME, HD_C.NAME AS 'TICKET_TYPE', COUNT(HD_C.NAME) AS 'TICKET_COUNT'
FROM HD_TICKET HD_T
INNER JOIN USER U2 ON U2.ID = HD_T.OWNER_ID
INNER JOIN HD_CATEGORY HD_C ON HD_C.ID = HD_T.HD_CATEGORY_ID
WHERE HD_T.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 31 DAY)
AND HD_T.OWNER_ID <> 0
GROUP BY FULL_NAME, TICKET_TYPE
ORDER BY FULL_NAME, TICKET_TYPE ASC;
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.