with tmp as ( (select uid, 'exam' as type, date_format(start_time, '%Y%m') as act_month, date_format(start_time, '%Y%m%d') as act_day from exam_record where uid in (select uid from user_info where level ...