select hpzl,hphm,sum(ycf) as ycf,sum(wcf) as wcf from (
select hpzl,hphm,count(*) as ycf,0 as wcf  from vio_convey_monctrl where clbj='1' group by hpzl,hphm
union all
select hpzl,hphm,0 as ycf,count(*) as wcf from vio_convey_monctrl where clbj='0' group by hpzl,hphm) a
group by hpzl, hphm