#筛选用户
with t1 as (select uid,count(uid) from exam_record er
where date_format(start_time,'%Y-%m') = date_format(submit_time,'%Y-%m') and date_format(submit_time,'%Y-%m') = '2021-09'
group by uid
having count(uid) >= 3
)
#合并表

select tag,count(tag) as tag_cnt from exam_record er 
join t1 on er.uid = t1.uid
join examination_info ei on er.exam_id = ei.exam_id
group by tag
order by count(tag) desc