题解 | #存在绩点大于该校平均绩点时的学生信息#
存在绩点大于该校平均绩点时的学生信息
https://www.nowcoder.com/practice/860fb125c6ac49b080766040f3bd902f
select device_id,t1.university
from
user_profile as t1
left join
(select university,avg(gpa) avg_gpa
from user_profile
group by university) as t2
on t1.university=t2.university
where gpa>avg_gpa
and avg_gpa>3.6
order by device_id desc
#逃离互联网##MySQL#
from
user_profile as t1
left join
(select university,avg(gpa) avg_gpa
from user_profile
group by university) as t2
on t1.university=t2.university
where gpa>avg_gpa
and avg_gpa>3.6
order by device_id desc
#逃离互联网##MySQL#