题解 | #SQL类别高难度试卷得分的截断平均值#
SQL类别高难度试卷得分的截断平均值
http://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45
慢是慢了些,不过能用
select 'SQL' AS tag,'hard' AS difficulty,round((sum(score)-min(score)-max(score))/(count(score)-2),1) as clip_avg_score FROM exam_record
WHERE exam_id in
(select exam_id from examination_info where tag='SQL' and difficulty='hard')
select 'SQL' AS tag,'hard' AS difficulty,round((sum(score)-min(score)-max(score))/(count(score)-2),1) as clip_avg_score FROM exam_record
WHERE exam_id in
(select exam_id from examination_info where tag='SQL' and difficulty='hard')