Home > database >  Don't change the list data showed that under the premise of, the middle box the sum of time dif
Don't change the list data showed that under the premise of, the middle box the sum of time dif

Time:03-06


The trouble is that there are two 1, article, and the other a total sum, need time for bosses to see how to write? Said total length, in minutes, split the day//in front of the points, should not do, there's a minute behind statistics, use it, the original SQL
 select -- wftask. *, 
Usr. Realname wftaskExcutor,
Usr2. Realname wftaskPrevExcutor,
Wftask taskname,
Extract (day from wftask. Endtime - wftask. Starttime) wftaskDay,
Extract (hour from wftask. Endtime - wftask. Starttime) wftaskHour,
Extract (minute from wftask. Endtime - wftask. Starttime) wftaskMin,
Round (to_number (to_date (to_char (wftask. Endtime 'yyyy - mm - dd hh24: mi: ss'), '- dd yyyy - mm hh24: mi: ss')
- to_date (to_char (wftask starttime, 'yyyy - mm - dd hh24: mi: ss'), '- dd yyyy - mm hh24: mi: ss')) * 24 * 60) wftaskSumMin
The from co_workflow_task wftask
Inner join co_user usr
On wftask. Executor=usr. Username
Inner join co_user usr2
On wftask. Prevexecutor=usr2. Username
Inner join tb_sm_poa_info poa
On poa. Id=wftask. Extendfield1
Where poa. Id='402897 bb777bc6f101777bd2ab210017'
Order by wftask. Starttime desc
  • Related