timestamp 类型的数据计算秒数差。比如耗时多少秒,最少1秒
SELECT
trunc((to_date(TO_CHAR(A.end_time, 'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') -
to_date(TO_CHAR(A.start_time, 'yyyy-mm-dd hh24:mi:ss'), 'YYYY-MM-DD HH24:mi:ss')) * 24 * 60
* 60+1) costtime
FROM
RWDD_RWLSXX A
order by costtime DESC ;