sqlite 实现时间的累加

表格:data

时间                     金额

2015-01-01         10000

2015-01-02          20000

2015-01-03          30000

select a.时间,sum(b.金额) as 累计金额  

from  data a,data b

where a.时间>=b.时间

group by a.时间

posted @ 2018-07-05 13:59  The_Chain  阅读(363)  评论(0编辑  收藏  举报