KACE Product Support Question

What is the correct SQL for running a report that counts all tickets where Queue name = Help Desk, that have been created after a specific time of day (ie. 3:00pm) Ordered by Month?

05/29/2015 1330 views
I am new to SQL and have a special request for a report to determine if Help Desk hours need to change during certain times of the year. Thanks for any and all help.
0 Comments   [ + ] Show comments


All Answers

Did you mean this resultset?

select count(*) as TotalTicketCount
  from HD_TICKET as t, HD_QUEUE as q
 where t.HD_QUEUE_ID = q.ID
   and q.NAME = 'Help Desk'
   and t.CREATED >= DATE_ADD(NOW(), INTERVAL -3 month)
Answered 06/02/2015 by: aragorn.2003
Red Belt

  • Aragorn - Thanks for you response. I will make the change to the interval to -24 months to gather enough historical data. This is what I have been working on as well:

    Select * from HD_TICKET
    where HD_QUEUE_ID = 1 and
    time(MODIFIED) >= ('15:00:00')
    order by created desc;

    I want to incorporate a count by month into my query. Currently, I can export the query into Excel and calculate these totals but sure would like to have it all done by the query if possible. Any further suggestions?

Don't be a Stranger!

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

Sign up! or login


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