题目:
第8行表示用户id为8的用户选择了前端岗位并且考了9999分
请你写一个sql语句查询用户分数大于其所在工作(job)分数的平均分的所有grade的属性,并且以id的升序排序,如下:
select g.id, g.job, g.score from grade g
where g.score > (select avg(score) from grade g1
where g.job = g1.job group by job)
题目:
第8行表示用户id为8的用户选择了前端岗位并且考了9999分
请你写一个sql语句查询用户分数大于其所在工作(job)分数的平均分的所有grade的属性,并且以id的升序排序,如下:
select g.id, g.job, g.score from grade g
where g.score > (select avg(score) from grade g1
where g.job = g1.job group by job)