/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Report for how many tickets have been logged per week (to any queue)

07/19/2018 628 views
I need to prduce a report weekly for "how many calls were logged this week" this can be manually, emailed etc. I just need an overall number
0 Comments   [ + ] Show comments

Comments


All Answers

3
Here is one method that uses the week function:
SELECT YEAR(CREATED) AS Year, WEEK(CREATED) AS Week, 
COUNT(ID) AS "Opened"
FROM ORG1.HD_TICKET
WHERE YEAR(CREATED) = YEAR(NOW())
AND WEEK(CREATED) = WEEK(NOW())
GROUP BY YEAR(CREATED), WEEK(CREATED)
This uses tickets opened in the past seven days:
SELECT COUNT(ID) FROM ORG1.HD_TICKET
WHERE DATE(CREATED) > DATE_SUB(NOW(), INTERVAL 7 DAY)
You can create a report using either one and schedule the report to run as needed.

Answered 07/19/2018 by: chucksteel
Red Belt

 
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