10-261 查询平均成绩高于75分的学生(MSSQL)
select sno as 学号,avg(grade) as 平均成绩
from sc
group by sno
having avg(grade) > 75
10-262 查询未登记成绩的学生
select sno
from sc
where grade is null
10-263 查询选修‘C语言’课程的学生
select sname 姓名,grade 成绩
from sc,stu
where sc.sno=stu.sno and cno = (select cno from cou where cname = N'C语言')
order by grade desc;
10-264 查询没有选修'C语言'课程的学生(MSSQL)
select sno 学号,sname 姓名
from stu
where sno not in
(
select sno from sc where cno = (select cno from cou where cname = N'C语言')
);
10-265 查询同专业的学生(MSSQL)
select sno 学号,sname 姓名
from stu
where mno = (select mno from stu where snam