56,679
社区成员
发帖
与我相关
我的任务
分享
create table #test (A varchar(20),B int)
insert into #test
select '01',10 union All
select '01',20 union All
select '02',100 union All
select '03',50 union All
select '03',50
select SUM(B) AS VALUE from #test
GROUP BY A
select SUM(B) AS VALUE from #test
GROUP BY A='01'