select 
device_id,
university,
gpa
from (select *,row_number() over(partition by university order by gpa asc) as rn from user_profile) tmp  where rn =1;