select AVG(grade)
from Score
where sno in(select SNO from Student
where SCLASS in (select SCLASS from Student where SNO='96001'))
and cno in (select CNO from Course where CNAME='数学分析')
用in,不能用等号是一对一的值,如果后面是多个值就会报错.
from Score
where sno in(select SNO from Student
where SCLASS in (select SCLASS from Student where SNO='96001'))
and cno in (select CNO from Course where CNAME='数学分析')
用in,不能用等号是一对一的值,如果后面是多个值就会报错.
from Score a
inner join Student b on a.sno=b.sno
inner join Course c on a.cno=c.cno
where b.sno='96001' and c.CNAME='数学分析'