→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎01-03-2020 10:34 AM
‎02-04-2020 02:26 PM
Select Top 1000000 TicketClosures.Year,
htblusers.name As Agent,
TicketClosures.ticketid,
ticketClosures.typename
From (Select Distinct Top 1000000 htblhistory.ticketid,
htblhistory.userid,
htbltickettypes.typename,
DatePart(yyyy, htblhistory.date) As Year,
DatePart(mm, htblhistory.date) As Month,
DatePart(dd, htblhistory.date) As Day
From htblhistory
Inner Join htblhistorytypes On htblhistorytypes.typeid =
htblhistory.typeid
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblhistory.ticketstateid
inner join htbltickettypes on htbltickettypes.tickettypeid = htblhistory.tickettypeid
Where htblticketstates.statename = 'Closed') TicketClosures
Inner Join htblticket On htblticket.ticketid = TicketClosures.ticketid
Inner Join htblusers On htblusers.userid = TicketClosures.userid
Where TicketClosures.Year = 2019 And htblticket.spam <> 'True'
Order By htblusers.name Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now