题解 | #SQL类别高难度试卷得分的截断平均值#
SQL类别高难度试卷得分的截断平均值
https://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45
SELECT #这些信息是固定的,直接写死 'SQL', 'hard', ROUND(AVG(e.`score`),1) AS clip_avg_score FROM exam_record e JOIN examination_info i ON e.exam_id = 9001 WHERE #去掉最高分和最低分 e.score NOT IN ( SELECT MAX(score) FROM exam_record UNION SELECT MIN(score) FROM exam_record );