row_number() over(partition by <> order by <>)

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