oracle数据库求差值的sql语句?
with t1 as (select shuzi,riqi,rownum as rnfrom (select shuzi,riqifrom Aorder by 2) t)select p.shuzi-nvl(m.shuzi,0) as new_shuzi,p.riqifrom t1 pleft join t1 m on p.rn-1=m.rn;你看下这个结果