→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎09-14-2021 11:08 PM
Select Top 1000000 htblticketcustomfield.data As Department,
Count(htblticket.ticketid) As [Total Tickets opened in 2021]
From htblticket
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htblpriorities On htblpriorities.priority = htblticket.priority
Inner Join htblticketcustomfield On htblticket.ticketid =
htblticketcustomfield.ticketid
Inner Join htblcustomfields On htblcustomfields.fieldid =
htblticketcustomfield.fieldid
Where htblcustomfields.labeltext = 'Main Department' And DatePart(yyyy,
htblticket.date) = '2021'
Group By htblticketcustomfield.data
‎10-01-2021 05:03 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now