题解 | #SQL类别高难度试卷得分的截断平均值#
SQL类别高难度试卷得分的截断平均值
https://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45
SELECT tag,difficulty,round((sum(score)-max(score)-min(score))/(count(1)-2),1) clip_avg_score from ( SELECT er.*,ei.tag,ei.difficulty,ei.release_time from exam_record er join examination_info ei on er.exam_id=ei.exam_id WHERE tag='SQL' and difficulty='hard' )t1 where score is not null ; 直接不用group by语句了,因为已经限定了条件‘SQL’,这里为什么一定要加上‘hard’限定条件不是很理解,自己的mysql可以执行,这里无法通过