Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Trying to Create an After Hours Report Spiceworks HelpDesk

$
0
0

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...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>