/build/static/layout/Breadcrumb_cap_w.png

Count tickets open/not due and closed/overdue

I need to create a report that counts tickets created within a time period (last 31 and last 7) which match these criteria

Closed < Due Date or Open and Due Date > Today
and
Closed > Due Date or Open and Due Date < Today

I used with Altiris to dump the tickets created in the date range and use excel date calcs to work out the rest, but the format KACE reporting dumps ticket data in causes havoc with Excel date calculations - it sees anything before month 10 as a string and anything after as a serial number. Aaagh!

Any help much appreciated :)

0 Comments   [ + ] Show comments

Answers (1)

Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
dumps ticket data in causes havoc with Excel date calculations
If you think it is the kbox you should open a ticket, but sometimes excel needs to be told that a column is holding date types instead of "general" types

Here's the basics for the count:

select COUNT(*) from HD_TICKET WHERE CREATED > DATE_SUB(CURDATE(), INTERVAL 31 DAY)


Adding "Open and Due Date > Today":

select COUNT(*) from HD_TICKET
JOIN HD_STATUS S ON S.ID=HD_STATUS_ID
WHERE CREATED > DATE_SUB(CURDATE(), INTERVAL 31 DAY)
and S.STATE='Opened'
and DUE_DATE> CURDATE()


Other combinations should follow from those

Comments:
  • Can this SQl be edited to show ticket count for a specific date range? what would that look like? - bryscott91 6 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

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

Sign up! or login

View more:

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