Time elapsed by each group in request ( MSSQL )

Time elapsed by each group in request ( MSSQL )

Tested in Build MSSQL (14306)

Go to Reports-New Query Reports and execute the below query.


SELECT wo.WORKORDERID AS "Request ID", mdd.MODENAME AS "Request Mode", qd.QUEUENAME AS "Current Group", aau.FIRST_NAME AS "Requester", ti.FIRST_NAME AS "Technician", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", icd.NAME AS "Item", wo.TITLE AS "Subject", wotodesc.FULLDESCRIPTION AS "Description", ad.ORG_NAME AS "Account", serdef.NAME AS "Service Category",reqtemp.templatename "Template Name",qd1.QUEUENAME "From Group", qd2.QUEUENAME "To Group",cast((wog.timespent/60) as varchar(20)) +':'+cast((wog.timespent % 60) as varchar(20)) "Time Elapsed" FROM WorkOrder wo 
LEFT JOIN ModeDefinition mdd ON wo.MODEID=mdd.MODEID 
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID 
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID 
LEFT JOIN WorkOrderToDescription wotodesc ON wo.WORKORDERID=wotodesc.WORKORDERID 
LEFT JOIN ServiceDefinition serdef ON wo.SERVICEID=serdef.SERVICEID 
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID 
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID 
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID 
LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID 
LEFT JOIN ItemDefinition icd ON wos.ITEMID=icd.ITEMID 
LEFT JOIN SubCategoryDefinition scd ON wos.SUBCATEGORYID=scd.SUBCATEGORYID 
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID 
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID 
LEFT JOIN AccountSiteMapping asm ON wo.siteid=asm.siteid 
LEFT JOIN AccountDefinition ad ON asm.accountid=ad.org_id 
LEFT JOIN requesttemplate_list reqtemp ON reqtemp.templateid=wo.templateid
LEFT JOIN wo_assessment woa on wo.workorderid=woa.workorderid
INNER JOIN WO_GROUP_INFO wog on woa.assessmentid=wog.assessmentid
LEFT JOIN QueueDefinition qd1 ON wog.groupid=qd1.QUEUEID
LEFT JOIN QueueDefinition qd2 ON wog.nextgroupid=qd2.QUEUEID
WHERE (wo.ISPARENT='1')

This works only in MSSQL

                  New to ADSelfService Plus?

                    • Related Articles

                    • Time elapsed by each group in requests. PGSQL

                      Tested in Build PGSQL (14300) Go to Reports-New Query Report and execute the below query. SELECT wo.WORKORDERID AS "Request ID", mdd.MODENAME AS "Request Mode", qd.QUEUENAME AS "Current Group", aau.FIRST_NAME AS "Requester", ti.FIRST_NAME AS ...
                    • Time elapsed analysis

                      This Report gives a clear picture of, how long the request was handled by each technician, stayed in each group and stayed in different statuses. Capturing each action performed on the request can be helpful for the request management team to assess ...
                    • Query to find Time elapsed by each status in requests( MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) MSSQL SELECT wo.WORKORDERID AS "Request ID", mdd.MODENAME AS "Request Mode", qd.QUEUENAME AS "Group", aau.FIRST_NAME AS "Requester", ti.FIRST_NAME AS "Technician", cd.CATEGORYNAME AS "Category", scd.NAME ...
                    • How Time Elapsed is calculated?

                      What is Time Elapsed? Time Elapsed is the calculation of the time taken for the completion of the request created with a proposed solution. How Time Elapsed is calculated? ** This calculation depends upon Sites,Operational Hours,Holidays,Request ...
                    • Request Time Analysis Reports (Status, Group, Technician Fields changes and its timespent) (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) This report contains the time analysis for each status/group/technician changes in a request, kindly execute this under Reports->New Query Report. Status Changes: SELECT wo.WORKORDERID AS "Request ID", ...