select distinct(b.tag),count(b.tag) as tag_cnt from exam_record a inner join examination_info b ON a.exam_id = b.exam_id WHERE a.uid in (SELECT c.uid FROM exam_record c where c.submit_time is not null GROUP BY c.uid,month(c.submit_time) HAVING count(c.submit_time)>=3) GROUP BY b.tag ORDER BY tag_...