题解 | #找出每个学校GPA最低的同学#

找出每个学校GPA最低的同学

https://www.nowcoder.com/practice/90778f5ab7d64d35a40dc1095ff79065

SELECT device_id,t1.university,t1.gpa
 from user_profile t1
        inner join 
        (select min(gpa) as lowest_gpa,t2.university
        from user_profile t2
        group by t2.university 
        ) t3
        on t1.university=t3.university and t1.gpa=t3.lowest_gpa
 order by t1.university ASC

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务