select * from ( SELECT DISTINCT RepMonth as RepMonth FROM obj_date WHERE RepDate <= NOW() AND DATE_FORMAT( RepDate, '%Y' ) = DATE_FORMAT(NOW(),'%Y') ) od LEFT JOIN ( SELECT IFNULL(count(DISTINCT project_id)/ (select count(id) as total from system_project where org_id = (select id from sys_depart where depart_name = '苏南分公司') and depart_id in (select id from sys_depart where depart_name = '历史研究院' )),0.01) as '填报率', CONCAT(MONTH(create_time),'月') as '月份' FROM aq_identificationlist WHERE branch_office = '苏南分公司' and date_format( create_time, '%Y' )= '2022' and bpm_status != '1' and bpm_status != '4' and project_id in (select id from system_project where depart_id in (select id from sys_depart where depart_name = '历史研究院' )) GROUP BY CONCAT(MONTH(create_time),'月') ) bo on od.RepMonth = bo.月份 |