mdsk.net
当前位置:首页 >> sql函数,sElECt Count(A.ABC) As sum From A lEFt... >>

sql函数,sElECt Count(A.ABC) As sum From A lEFt...

SELECT SUM ( t.iSum ) as sum FROM ( select count(A.abc) as iSum from A left join B on A.id=B.id where A.abc='1' group by A.abc ); 或者 select count(A.abc) as sum from A left join B on A.id=B.id where A.abc='1'

select aa.*,b.c from (select count(*) as a,left(B,2) as b from A group by left(B,2)) as aa join (select count(*) as c,left(B,2) as b from B group by left(B,2)) as bb on aa.b=bb.b

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com