Is there a way to report on tickets submitted during a certain window of time in a day without doing SQL? If SQL is required, does anyone have a cheat sheet I could use?
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


What exact information/fields from the tickets do you want to display in this report?
Answered 07/10/2011 by: KevinG
Blue Belt

Please log in to comment
Here is some simple MySQL to get you started:
extract(day from `CREATED`) day,
extract(hour from `CREATED`) hour,
where month(created) = 7
group by extract(day from`CREATED`), extract(hour from`CREATED`);

It uses two functions to help you:
Extract allows a part of the timestamp field to be returned. Further documentation of the parts of the timestamp value that can be extracted are posted to: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add

The other function, month() is only one example of the same type of function that truncates the timestamp into portions that can be grouped. I selected all tickets that were created in July (note that the year is NOT selected), and grouped the count of tickets by the day and hour of the day in which they were created.

Output looks like:
'1', '3', '2'
'1', '6', '1'
'1', '7', '1'
'1', '9', '7'
Answered 07/15/2011 by: naturboy1975
Yellow Belt

Please log in to comment