select a.device_id,a.university,a.gpa from
(select device_id,university,gpa,dense_rank() over (partition by university order by gpa) as ranking
from user_profile
)a
where a.ranking =1 

最值问题可以通过排序实现