How Do I get a total number of tickets submitted for the 7/1/2018 - 6/30/19 range and another with a break down of all departments and the number submitted.
How Do I get a total number of tickets submitted for the 7/1/2018 - 6/30/19 range and another report with a break down of all the departments and the number submitted.
1 Comment
[ + ] Show comment
Answers (0)
Please log in to answer
Be the first to answer this question
SELECT HD_QUEUE.NAME as Queue,
count(HD_TICKET.ID) as "Tickets Created"
from HD_TICKET
JOIN HD_QUEUE on HD_QUEUE.ID = HD_TICKET.HD_QUEUE_ID
where HD_TICKET.CREATED>'2019-09-21 00:00:00' /*change the start date here Y-M-D*/
and HD_TICKET.CREATED<'2019-10-18 23:59:59' /*change the end date here Y-M-D*/
and HD_TICKET.HD_QUEUE_ID in (2,3,4,10,12) /*add queue numbers here*/
GROUP BY QUEUE - grenaud 5 years ago