题解 | #得分不小于平均分的最低分#

得分不小于平均分的最低分

https://www.nowcoder.com/practice/3de23f1204694e74b7deef08922805b2



select 
min(t.score) as min_score_over_avg
from(
select 
ed.exam_id,score,
avg(score)over(partition by exam_id) as pg
from exam_record ed left join examination_info ef 
on ed.exam_id=ef.exam_id
where
ef.tag="SQL"
) as t 
where
t.score>=t.pg

全部评论

相关推荐

互联网哆啦:职业技能熟悉的太多了,但是项目里却只做了后端工作,这个真实性存疑
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务