select device_id,university, gpa from 
(select device_id ,university, gpa, row_number() over(partition by university order by gpa)  rn from user_profile ) a
where a.rn=1 order by university ;