select
    tag,
    difficulty,
    round(
        (sum(score) - min(score) - max(score)) / (count(score) -2),
        1
    ) as clip_avg_score
from
    examination_info ei
    join exam_record er on ei.exam_id = er.exam_id
where
    ei.difficulty = 'hard'
    and score is not null
    and tag = 'SQL';