select b.company_id ,sum(if(a.resume_if_checked = 1, 1, 0)) as cnt from deliver_record a left join job_info b on a.job_id = b.job_id group by company_id having cnt != 0 order by company_id
select b.company_id ,sum(if(a.resume_if_checked = 1, 1, 0)) as cnt from deliver_record a left join job_info b on a.job_id = b.job_id group by company_id having cnt != 0 order by company_id