→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
02-14-2020 05:01 PM
Select Top 1000000 DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
DatePart(dd, htblticket.date) As Day,
htbltickettypes.typename Type,
htblusers.name As AssignedAgent,
Count(htblticket.ticketid) As TicketCount
From htblticket
Inner Join htblagents On htblagents.agentid = htblticket.agentid
Inner Join htblusers On htblusers.userid = htblagents.userid
Inner Join htbltickettypes On htbltickettypes.tickettypeid =
htblticket.tickettypeid
Group By DatePart(yyyy, htblticket.date),
DatePart(mm, htblticket.date),
DatePart(dd, htblticket.date),
htbltickettypes.typename,
htblusers.name
Order By Year Desc,
Month Desc,
Day Desc,
Type,
AssignedAgent
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now