-- 1.找出每个学校最低的gpa:select university,min(gpa) from user_profile group by university
-- 2.找出对应的同学:where a.university = b.university and a.gpa = b.gpa
select a.device_id,b.university,b.gpa
from user_profile a,(select university,min(gpa) as gpa from user_profile group by university) b
where a.university = b.university and a.gpa = b.gpa order by university