select
    distinct
    t1.device_id,
    t1.university,
    t1.gpa
from
    user_profile t1
where 
    (t1.university,t1.gpa)  in (select university,min(gpa) from user_profile group by university )
order by
    t1.university