21天好习惯第十八期-18

  查询所选课程的平均成绩大于刘晨的平均成绩的学生学号、姓名及平均成绩

21天好习惯第十八期-18

 

select student.sno,student.sname,avg(grade)
from student,sc
where student.sno=sc.sno
group by student.sno,student.sname
having avg(grade)>
(select avg(grade)
from sc,student
where sc.sno=student.sno and sname='刘晨')

上一篇:g1的mixed gc详细过程


下一篇:【题解】AcWing 102.Best Cow Fences