SQL 同一个表里的多行怎么相加求和?
selectSUM(金额),名称,金额,aafromtest1where名称='591006'andTimebetween'2015-10-2308:52:50.000'...
select SUM(金额),名称,金额, aa from test1 where 名称='591006'
and Time between '2015-10-23 08:52:50.000' and '2015-10-23 23:52:50.000' and aa='2367'
GROUP BY 名称,金额,aa,
怎么把6行的金额求和起来。哪位朋友知道的,帮忙下 谢谢!! 展开
and Time between '2015-10-23 08:52:50.000' and '2015-10-23 23:52:50.000' and aa='2367'
GROUP BY 名称,金额,aa,
怎么把6行的金额求和起来。哪位朋友知道的,帮忙下 谢谢!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询