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

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

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

select min(er.score) as min_score_over_avg
# 获取符合列最小的数
from exam_record er 
join examination_info ei using(exam_id)
where tag = 'SQL' AND score >=
(
    select avg(e1.score)
    from exam_record e1 
    join examination_info e2 using(exam_id)
    where tag = 'SQL'
)
# 选中sql类,分数大于平均分,这里的平均分用子查询获取直接使用


全部评论

相关推荐

2025-12-15 12:50
河北工程大学
sta666:我也是这个国际商业化的,三天,一天一面,就通过了,不过我是后端实习生,好好面感觉能过。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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