with report as(
select
date_format(submit_time,'%Y%m') month,
uid,
count(submit_time) cnt
from exam_record
where submit_time is not null
group by month,uid
having cnt>=3
)
select
info.tag,
count(tag) tag_cnt
from exam_record re
join examination_info info
on (re.exam_id=info.exam_id)
where uid in (
select uid from report
)
group by info.tag
order by tag_cnt desc;