题解 | #SQL类别高难度试卷得分的截断平均值#
SQL类别高难度试卷得分的截断平均值
https://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45
with t1 as ( select a.exam_id, b.score, a.tag, a.difficulty from examination_info a left join exam_record b on a.exam_id = b.exam_id where tag = 'SQL' and difficulty = 'hard' ) select tag, difficulty, round(avg(score),1) as clip_avg_score from t1 where score not in ( select max(score) from t1 union all select min(score) from t1 )