union all select '1' eventState,'处理中' eventStateLabel
union all select '2' eventState,'已完成' eventStateLabel) t1
left join
(select event_state,count(*) num from dc_event
where event_type = '1' and date_format(start_time,'%y%m') = date_format(now(),'%y%m')
group by event_state) t2
on t1.eventState = t2.event_state
(SELECT '待确认' eventStateLabel,count(*) num FROM dc_event where event_type = '1' and date_format(create_time,'%y%m') = date_format(now(),'%y%m') and event_state = '0')
UNION All
(SELECT '处理中' eventStateLabel,count(*) num FROM dc_event where event_type = '1' and date_format(start_time,'%y%m') = date_format(now(),'%y%m') and event_state = '1')
UNION All
(SELECT '已完成' eventStateLabel,count(*) num FROM dc_event where event_type = '1' and date_format(end_time,'%y%m') = date_format(now(),'%y%m') and event_state = '2')