with t as
(select (max(t.status_date)) t1 , (min(t.create_date)) t2
from abs_generl.prodord_sku_his t
where t.customer_num = '29001SN011900016'
)
select abs((trunc(t1 - 0, 'mi') - trunc((t2 - 0), 'mi')) * 24 * 60 * 60 +
extract(second from t1 - t2))
from t
with t as
(select t.status_date t1 , t.create_date t2
from abs_generl.prodord_sku_his t
where t.customer_num = '29001SN011900016'
)
select abs((trunc(t1 - 0, 'mi') - trunc((t2 - 0), 'mi')) * 24 * 60 * 60 +
extract(second from t1 - t2))
from t