/build/static/layout/Breadcrumb_cap_w.png

Total Weekly Tickets Report

Hi there fellow IT Ninja's

I'm looking into a way to create a report that displays the total tickets closed by a ticket owner on a weekly basis with a final overall total ticket count.
I found a post which has a sql query that does pretty much what I'm after but with little to no sql knowledge im not sure how to re-jig it.

What would I need to change to make the below query display ticket owners instead of categories?

The sql report i found used this query:

SELECT
HD_CATEGORY.NAME AS 'Category',
COUNT(HD_TICKET.TITLE) as 'Count of Tickets'
FROM
HD_TICKET,
HD_CATEGORY
WHERE
HD_TICKET.HD_CATEGORY_ID = HD_CATEGORY.ID
AND (HD_TICKET.HD_QUEUE_ID = 1)
AND HD_TICKET.CREATED >= (CURDATE() - INTERVAL 7 DAY)
group by CATEGORY
UNION Select
'TOTAL', count(HD_TICKET.ID)
FROM
HD_TICKET,
HD_CATEGORY
WHERE
HD_TICKET.HD_CATEGORY_ID = HD_CATEGORY.ID
AND (HD_TICKET.HD_QUEUE_ID = 1)
AND HD_TICKET.CREATED >= (CURDATE() - INTERVAL 7 DAY)
 
(Link to original post: http://www.itninja.com/question/total-count-report-for-kace-sd-tickets)

0 Comments   [ + ] Show comments

Answers (1)

Posted by: aragorn.2003 8 years ago
Red Belt
0
Did you mean this one?

SELECT OWNER_ID, count(*) as TicketCounter
  FROM HD_TICKET
 WHERE HD_TICKET.CREATED >= (CURDATE() - INTERVAL 7 DAY)
GROUP BY OWNER_ID

Comments:
  • That looks like what im roughly after just a quick question will this display only the closed tickets? - helpdeskmonkey 8 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ