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

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

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

# 请从试卷作答记录表中找到SQL试卷得分不小于该类试卷平均得分的用户最低得分。
# SQL试卷、 不小于 、 该类试卷均分、最低分

select min(score)
from exam_record t1 
left join examination_info t2
on t1.exam_id = t2.exam_id
where t2.tag = 'SQL'
and score >= (
                select avg(score)
                from exam_record t1 
                left join examination_info t2
                on t1.exam_id = t2.exam_id
                where t2.tag = 'SQL'
)
全部评论

相关推荐

秒拒也太伤人心了
码农索隆:非得字节嘛
投递字节跳动等公司8个岗位
点赞 评论 收藏
分享
07-21 12:41
已编辑
门头沟学院 Java
steelhead:不是你的问题,这是社会的问题。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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