SELECT ifnull(a.diagnosis_result, '') diagnosisResult, count(1) total FROM video_camera aa LEFTJOIN video_intact_diagnosis_status_201912 a ON ( aa.id = a.camera_id AND a.check_day = '20191223' ) LEFTJOIN unit_project p ON p.id = aa.project_id WHERE aa.del_flag = 0 GROUPBY a.diagnosis_result