日期:2014-05-17 浏览次数:21152 次
select a.*,
nvl(round(money/lag(money) over(order by id)*100,2)-100,'0')
------解决方案--------------------
'%' "同比",
nvl(round(money/lag(money) over(partition by month order by year)*100,2)-100,'0')
------解决方案--------------------
'%' "环比"
from d_temp_data a