Added in v.6.0.100
The report below gives back a count of the tickets that have been closed during each year/month.
The report will only take into account tickets that meet all of the following criteria:
- The ticket has not been set to ‘Ignore’
- The ticket is set to the ‘closed’ state
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