select t.device_id, t.university,round(t.gpa,4) from (select *,rank()over (partition by university order by gpa asc) as GPA_ranking from user_profile ) t where GPA_ranking = 1;