/bundles/itninjaweb/img/Breadcrumb_cap_w.png
I would like to get a simple report that shows the total number of tickets by submitter. Something like the output from the SQL statement in http://itninja.com/question/number-of-helpdesk-tickets-closed-by-owner-in-the-last-30days - except looking at submitter instead of owner.

Thanks for any input!
Dennis
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Simply change instances of Owner to Submitter.

SELECT IFNULL(SUB.FULL_NAME,'Unassigned') AS 'Submitter', COUNT(T.ID) AS '# of Tickets' FROM HD_TICKET T
JOIN HD_STATUS S ON (T.HD_STATUS_ID = S.ID)
LEFT JOIN USER SUB ON (T.SUBMITTER_ID = SUB.ID)
WHERE (S.STATE = 'closed' AND DATEDIFF(NOW(), T.TIME_CLOSED) < 30)
GROUP BY SUB.FULL_NAME
Answered 04/07/2011 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Nice - Thanks!! Just in case anyone else wants to organize it by ticket quantity add "order by COUNT(T.ID) DESC" as another line at the bottom.
Answered 04/07/2011 by: ddevore
Fourth Degree Green Belt

Please log in to comment
0
This has come in very handy, any way to limit the results to a date range and to a specific queue?
Answered 08/04/2011 by: hchavarria
Senior Yellow Belt

Please log in to comment
0
You'll need to modify the where statement to filter either ticket created or closed (depending what you care about) and the HD_QUEUE filed.

Give the SQL a shop we'll help if you get stuck.
Answered 08/05/2011 by: dchristian
Red Belt

Please log in to comment