select e2.tag,e2.difficulty,round(avg(e1.score),1) as clip_avg_score from examination_info e2 join exam_record e1 on e1.exam_id=e2.exam_id where e2.tag='SQL&(30885)#39; and e2.difficulty='hard' and e1.score not in (select max(score) from exam_record) and e1.score not in (select min(score) from exam_record) group by tag