select c.tag,d.cnt
from(
select a.tag,count(b.start_time) as cnt
from examination_info a,exam_record b 
where a.exam_id=b.exam_id group by 1) c,
(
select a.tag,count(b.start_time) as cnt
from examination_info a,exam_record b 
where a.exam_id=b.exam_id group by 1) d
where upper(c.tag)=d.tag and c.tag<>upper(c.tag) and c.cnt<3