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

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

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

select min(exam_record.score) as min_score_over_avg

from exam_record, examination_info

where exam_record.exam_id = examination_info.exam_id and tag = 'SQL' and score >=

(select AVG(exam_record.score)

from exam_record, examination_info

where exam_record.exam_id = examination_info.exam_id and tag = 'SQL')

select min(e1.score) as min_score_over_avg from exam_record as e1, examination_info as e2 where e1.exam_id = e2.exam_id and tag = 'SQL' and score >= (select AVG(e1.score) from exam_record as e1, examination_info as e2 where e1.exam_id = e2.exam_id and tag = 'SQL')

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-11 12:10
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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