Find the Number of Helpdesk Tickets Finished per Month
Report on the number of tickets that were handled in a given month. Keeping track of the number of tickets that come through the helpdesk is an important metric when it comes to forecasting and for estimating the amount of work. The report gives an overview of the number of closed tickets per year and month. This way you have proof of the number of tickets finished which can be incorporated in a monthly review.
Count of Tickets Closed per Year and Month Query
Select Top 1000000 TicketClosures.Year,
TicketClosures.Month,
Count(TicketClosures.ticketid) As TicketClosed
From (Select Distinct Top 1000000 htblhistory.ticketid,
DatePart(yyyy, htblhistory.date) As Year,
DatePart(mm, htblhistory.date) As Month
From htblhistory
Inner Join htblhistorytypes On htblhistorytypes.typeid =
htblhistory.typeid
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblhistory.ticketstateid
Where htblhistorytypes.name In ('Status changed',
'Note added and state changed', 'Internal note added and state changed')
And htblticketstates.statename = 'Closed') TicketClosures
Inner Join htblticket On htblticket.ticketid = TicketClosures.ticketid
Where htblticket.spam <> 'True'
Group By TicketClosures.Year,
TicketClosures.Month
Order By TicketClosures.Year Desc,
TicketClosures.Month Desc