select device_id,university,gpa from ( select *, row_number() over (partition by university order by gpa) rd from user_profile ) as minm where rd=1