根据issuedate 排序,
计算issuecount-endcount的值,得到sumdata字段
使用子查询
select
issuecount,
endCount,
endDate,
issueDate,
sumData,
(
select
SUM(sumData)
from lastData as i
where
i.issueDate <= o.issueDate) as total
from
lastData as o