题解 | where 条件里边的子查询,等号(=)左边的组合
找出每个学校GPA最低的同学
https://www.nowcoder.com/practice/90778f5ab7d64d35a40dc1095ff79065
# select university,min(gpa) from user_profile # group by university select device_id,university,gpa from user_profile where (university,gpa) in (select university,min(gpa) from user_profile group by university) order by university;
where 条件里边的子查询,等号(=)左边的组合字段要加上括号:where (字段A,字段B) in (select语句)