I am trying to create a report that will track some stats about our Help Desk Tickets. I have managed to get a working weekly report, but am trying to add another metric to it.
What im specifically trying to add is a After Hours Count of help desk tickets. Between the hours of 4pm and 7am.
I have managed to get it working to count total tickets for the last seven days, but am having trouble with making it only show tickets between the specific time period.
Below is the part of the statement I am having trouble with.
Select "1. Global" as "Site", "1.8. After Hours Tickets (4pm-7am)" as "Category", count(id) as "Total"
from Tickets
where (created_at=date('now', '-7 days')) and between (created_at=time( '16:00:00' and '07:00:00'))
union
This part generates tickets in the last seven days"here (created_at=date('now', '-7 days'))"
but now i need...