题解 | #SQL类别高难度试卷得分的截断平均值#

SQL类别高难度试卷得分的截断平均值

http://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45

反正我是想不出特别好的实现了……

with tmp as (select ei.tag,ei.difficulty,score,row_number() over(order by score asc)as rn 
from exam_record er 
join examination_info ei 
on ei.tag='SQL' and ei.difficulty='hard' and er.exam_id=ei.exam_id 
where er.submit_time is not null) 
select tag,difficulty,round(avg(score),1)as clip_avg_score from tmp 
join (select max(rn) as mrn from tmp)c 
on tmp.rn<>c.mrn 
where rn<>1 
group by tag,difficulty;
全部评论

相关推荐

给我发了笔试链接,想着等晚上回去做,结果还没做流程就终止了
伟大的小黄鸭在学习:我猜就是笔试几乎没用,就是用来给用人部门拖时间复筛简历的,可能用人部门筛到你简历觉得不合适就提前挂了
投递小鹏汽车等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务