题解 | #存在绩点大于该校平均绩点时的学生信息#

存在绩点大于该校平均绩点时的学生信息

https://www.nowcoder.com/practice/860fb125c6ac49b080766040f3bd902f

#求每个学校的平均绩点
#select university,avg(gpa) from user_profile group by university;
#select a.device_id,a.university,a.gpa,b.av
#from user_profile a
#join (select university,avg(gpa) av from user_profile group by university)
#b on a.university=b.university ;

select c.device_id,c.university
from (select a.device_id,a.university,a.gpa,b.av
from user_profile a
join (select university,avg(gpa) av from user_profile group by university)
b on a.university=b.university )c
where c.gpa>c.av and c.av>3.6 order by c.device_id desc;
全部评论

相关推荐

神哥不得了:首先我就是在成都,成都的互联网格外的卷,如果是凭现在的简历的话很难找到大厂,建议再添加一个高质量的项目上去,另外专业技能的话最好是超过每一条的一半
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务