求截断平均值,按照题目的要求我们直接去掉exam_id为9001中的最高值和最低值再求平均数即可。
select tag,difficulty,t.clip_avg_score from (select round(((sum(score)-max(score)-min(score))/(count(score)-2)),1) clip_avg_score,exam_id from exam_record where exam_id=9001 and score is not null) t join examination_info e on t.exam_id=e.exam_id;

京公网安备 11010502036488号