select device_id,university,bgpa from (select device_id,university,gpa,min(gpa) over(partition by university order by university) as bgpa from user_profile )b where bgpa = gpa min(value)over(partition by 分组)函数是给每一行的末尾添加每个分组里最低的value值,然后在where筛选gpa与窗口函数所得值不同的行,这个时候剩下的就是每个学校gpa最低同学的信息