Query to show time spent added under home tasks.

Query to show time spent added under home tasks.

Please go to Reports-New Query Report and execute this query.


SELECT tk.TASKID "Task ID",MAX(tk.TITLE) "Task Title", cast((ct.TIMESPENT/1000 * interval '1 second') as varchar) "Time Spent",to_timestamp((ct.createdtime)/1000)::TIMESTAMP "Time Spent Created Time",rctd.FIRST_NAME "Time Spent Technician" FROM ChargesTable ct
LEFT JOIN TaskToCharge tkc ON ct.CHARGEID=tkc.CHARGEID
LEFT JOIN  TaskDetails tk ON tkc.TASKID=tk.TASKID
LEFT JOIN SDUser rcti ON ct.TECHNICIANID=rcti.USERID LEFT JOIN AaaUser rctd ON rcti.USERID=rctd.USER_ID 
LEFT JOIN queue_technician qt on qt.technicianid = rcti.userid 
left join queuedefinition q on q.queueid = qt.queueid
where module='general' AND ct.createdtime >= CAST(EXTRACT(EPOCH FROM TIMESTAMP '2018-01-01 00:00:00') * 1000 AS BIGINT)  AND  ct.createdtime <= CAST(EXTRACT(EPOCH FROM TIMESTAMP '2019-12-30 00:00:00') * 1000 AS BIGINT) GROUP BY tk.TASKID,rctd.FIRST_NAME,ct.TIMESPENT,ct.createdtime ORDER BY 5


PGSQL



      New to ADSelfService Plus?

        Resources