SELEC T top 1000000 [业务日期],sum([日销售]) as 日销售 FROM dbo.[日销售分析3] GROUP BY [业务日期], [日销售] ORDER BY [业务日期] ASC
[此贴子已经被作者于2016/5/27 9:57:42编辑过]
-- 作者:大红袍
-- 发布时间:2016/5/27 10:34:00
--
SELEC T top 1000000 [业务日期],sum([日销售]) as 日销售, (selec t sum([日销售]) from dbo.[日销售分析3] as b where b.业务日期<=a.业务日期) as 累计 FROM dbo.[日销售分析3] as a GROUP BY [业务日期], [日销售] ORDER BY [业务日期] ASC