select
a.active_time,b.active_time,(a.active_time - b.active_time),a.num,b.num
from
(select row_number() over (order by t.create_time desc) num,t.* from YB_WC_MONITOR t) a,
(select row_number() over (order by t1.create_time desc) num,t1.* from YB_WC_MONITOR t1) b
where
a.num=b.num-1;
网友评论