Contract timespent

Contract timespent

Version: 14200
DB : MSSQL

OUTPUT :




Query:

SELECT "rctd"."FIRST_NAME" AS "Time Spent Support Rep",
"ac"."CONTRACTNO" AS "Contract Number"  ,
"ac".contractname AS "Contract Name",
CAST((sum(ct.TIMESPENT)/3600000) AS VARCHAR(20)) +':'+CAST(((sum(ct.TIMESPENT) % 3600000)/ 60000) AS VARCHAR(20))  "Time Spent (Hrs : Mins)" FROM "ChargesTable" "ct"
LEFT JOIN "WorkLogtoContract" "wotoc" ON "ct"."CHARGEID"="wotoc"."CHARGEID"
LEFT JOIN "AccountContract" "ac" ON "wotoc"."CONTRACTID"="ac"."CONTRACTID"
LEFT JOIN "SDUser" "rcti" ON "ct"."TECHNICIANID"="rcti"."USERID"
LEFT JOIN "AaaUser" "rctd" ON "rcti"."USERID"="rctd"."USER_ID" group by "rctd"."FIRST_NAME","ac"."CONTRACTNO","ac".contractname  order by 2

                New to ADSelfService Plus?