由于聚合函数MIN()在GROUP BY 分组后将不能同步筛选出对应的device_id,university的信息,
需要通过row_number() over(partition by universtiy order by gpa)的窗口函数实现
SELECT device_id, university, gpa FROM (select device_id, university, gpa, row_number() over(PARTITION BY university ORDER BY gpa) as rn from user_profile) as t WHERE rn=1;