34,591
社区成员
发帖
与我相关
我的任务
分享
select *,sum(A6) over(partition by A2,A7,A9 ) into T2 from T1
select * from T2
select A2,A7,A9,sum(A6) into T2 group by A2,A7,A9
select A2,A7,A9,sum(A6) into T2 group by A2,A7,A9
select * ,
(select sum(A6) from table1 where A2=a.A2 and A7=a.A7 and A9=a.A9) as [A6Sum]
from table1 as a
select A2,A7,A9,sum(A6) as A6 -- ...
into T2 group by A2,A7,A9
ct A2,A7,A9,sum(A6) into T2 group by A2,A7,A9
或其它字段都用max()
ct A2,A7,A9,sum(A6) into T2 group by A2,A7,A9
或其它字段都用max()
select A2,A7,A9,sum(A6) into T2 group by A2,A7,A9
select A2,A7,A9,sum(A6) into T2 group by A2,A7,A9