题解 | #SQL类别高难度试卷得分的截断平均值#
SQL类别高难度试卷得分的截断平均值
https://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45
SELECT tag,difficulty, ROUND((SUM(score)-MAX(score)-MIN(score))/(SUM(IF(score IS NOT NULL,1,0))-2),1) AS clip_avg_score FROM exam_record JOIN examination_info ON exam_record.exam_id = examination_info.exam_id WHERE tag = 'SQL' AND difficulty = 'hard';