cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Nick_VDB
Champion Sweeper III
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
0 REPLIES 0

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now