select b.tag, b.difficulty, round((sum(a.score)-max(a.score)-min(a.score))/(count(a.score)-2),1) as clip_avg_score from exam_record a inner join examination_info b on a.exam_id = b.exam_id where b.tag = 'SQL' and a.submit_time is not NULL and b.difficulty = 'hard'