SQL query to find average resolved time

 

select aau.first_name “Technician”, convert(varchar(10),(avg(wo.RESOLVEDTIME)-avg(wo.createdtime))/1000/3600)+’:’+convert(varchar(10),((avg(wo.RESOLVEDTIME)-avg(wo.createdtime))/1000)%3600/60)+’:’+convert(varchar(10),(((avg(wo.RESOLVEDTIME)-avg(wo.createdtime)))/1000%60)) “Avg Time taken to Resolve” from workorder wo
left join workorderstates wos on wo.workorderid = wos.workorderid
left join statusdefinition sdf on wos.statusid=sdf.statusid
left join aaauser aau on wos.ownerid=aau.user_id
LEFT JOIN PriorityDefinition pd ON wos.PRIORITYID=pd.PRIORITYID
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID where wo.completedtime!=’0′ group by aau.first_name

 

 

This entry was posted in Reports.

Need More Help?

Are you looking for a personalized customer support? Submit your question or Call our Toll Free Number to speak with ServiceDesk Plus MSP Expert who can offer a better solution for your requirements.

Submit a Ticket
Email : sdpmsp@manageengine.com
Toll Free : 1-888-720-9500