题解 | #牛客考试分数(二)#
考试分数(二)
http://www.nowcoder.com/practice/f456dedf88a64f169aadd648491a27c1
with avg_sc as ( select job,avg(score) as j_s from grade group by job ), id_job as ( select id,a.job,score,j_s from grade a left join avg_sc b on a.job=b.job ) select id,job,score from id_job where score>j_s group by id order by id