22,298
社区成员
发帖
与我相关
我的任务
分享select *,B=(select sum(b) from TB where a=t.a) from tb t
select A,sum(B) as bb,max(C) C from TB group by A
select *,B=(select sum(b) from TB where a=t.a) from tb t select *,B=(select sum(b) from TB where a=t.a) from tb t select A,sum(B) as bb from TB group by A
还是要:
select A,B=(select sum(b) from TB where a=t.a),C from tb t group by a,cselect A,sum(B) as bb from TB group by A
select A,sum(B) as bb from TB group by A
select A,sum(B) as bb from TB group by A