‎05-12-2016 04:23 PM
Solved! Go to Solution.
‎05-26-2016 04:58 PM
Select Top 1000000 htblticket.ticketid As ID,
htblticket.subject As Subject,
htblusers.name As Agent,
Sum(htblnotes.timeworked) As [Time Worked (Mins)],
htblticketstates.statename
From htblticket
Inner Join htblnotes On htblticket.ticketid = htblnotes.ticketid
Inner Join htblagents On htblagents.agentid = htblticket.agentid
Inner Join htblusers On htblusers.userid = htblagents.userid
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Where htblticketstates.statename = 'closed' And htblnotes.notetype = 1
Group By htblticket.ticketid,
htblticket.subject,
htblusers.name,
htblticketstates.statename
‎05-26-2016 04:58 PM
Select Top 1000000 htblticket.ticketid As ID,
htblticket.subject As Subject,
htblusers.name As Agent,
Sum(htblnotes.timeworked) As [Time Worked (Mins)],
htblticketstates.statename
From htblticket
Inner Join htblnotes On htblticket.ticketid = htblnotes.ticketid
Inner Join htblagents On htblagents.agentid = htblticket.agentid
Inner Join htblusers On htblusers.userid = htblagents.userid
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Where htblticketstates.statename = 'closed' And htblnotes.notetype = 1
Group By htblticket.ticketid,
htblticket.subject,
htblusers.name,
htblticketstates.statename
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now