Report for how many tickets have been logged per week (to any queue)
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
Answers (1)
Please log in to answer
Posted by:
chucksteel
6 years ago
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.