日期:2014-05-16 浏览次数:20541 次
select user,(select sum(mmoney) from temp t where rownum<=temp.rownum) from(select row_number()over(order by ddate asc) as rownum,* from tb_list where user='用户1')temp
;with temp
as
(
select row_number()over(order by ddate asc) as rownum,*
from tb_list where user='用户1'
)
select user,(select sum(mmoney) from temp t where rownum<=temp.rownum)
temp