Hello, 

How do I modify the following canned report to not report on the last 31 days but the Month of April 2014?

select ifnull((select CUSTOM_2 from USER where HD_TICKET.SUBMITTER_ID = USER.ID),' External') as SUBMITTER_DEPT,

count(HD_TICKET.ID) AS Total_Requests

from HD_TICKET

left join HD_STATUS on HD_STATUS_ID = HD_STATUS.ID

where HD_STATUS.STATE = 'closed' and HD_TICKET.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 31 DAY)

group by SUBMITTER_DEPT

order by SUBMITTER_DEPT

 

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

4

replace

HD_TICKET.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 31 DAY)

with

HD_TICKET.TIME_CLOSED > date('2014-04-01') and HD_TICKET.TIME_CLOSED < date('2014-05-01')

Answered 05/15/2014 by: grayematter
Fourth Degree Black Belt

  • Awesome! Thank you Gray. Worked well.
    • Gambitz, don't forget to press the Up Arrow next to his answer to rate it up :)
Please log in to comment
Answer this question or Comment on this question for clarity