select device_id, university, gpa from ( select rank() over ( partition by university order by gpa ) rn, device_id, university, gpa from user_profile ) t where t.rn = 1