select sy.`status`, count(1) num from bs_sgc_sz_yhxx sy left join bs_sgc_sz_safe_jbxx sj on sj.id=sy.waga_id left join sys_xzqh sx on sj.adcd=sx.xzqhdm