select mc,sum(case when zt=1 then 1 end),Count(zt)
from a inner join b on a.id=b.id 
where mc='A1'
group by mc