题解 | #找出每个学校GPA最低的同学#
找出每个学校GPA最低的同学
https://www.nowcoder.com/practice/90778f5ab7d64d35a40dc1095ff79065
SELECT b.device_id, b.university, b.gpa FROM ( SELECT device_id, university, ROW_NUMBER() OVER(PARTITION BY university ORDER BY gpa) rak, gpa FROM user_profile ) b WHERE b.rak = 1 ORDER BY b.university
直接用查询后的表即可