select a.id,count(*) count from a join b ON a.id = b.id
换成
select a.id,b.count from a join (select count(*) count from b) b on a.id = b.id
select a.id,count(*) count from a join b ON a.id = b.id
换成
select a.id,b.count from a join (select count(*) count from b) b on a.id = b.id