Need Report that shows created tickets by Submitter/Group label
We are just settling in with our K1000 and would like to see how a report like this would look. Appreciate any help, thanks.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
JasonEgg
8 years ago
Here is a query that returns the count of tickets created for the past 30 days by the submitter's user label(s):
select L.NAME AS 'User Label',
COUNT(*) AS 'Tickets created past 30 days'
from HD_TICKET T
join `USER` U on T.SUBMITTER_ID = U.ID
join USER_LABEL_JT UL on UL.USER_ID = U.ID
join LABEL L on L.ID = UL.LABEL_ID
where T.CREATED > NOW() - INTERVAL 30 DAY
group by L.NAME
In my environment users can have multiple labels, so totaling the right column would give me an inflated number instead of the actual total number of tickets created during the specified interval.