17、查询所有有成绩的学生的学号和课程号
select Sno,Cno from SC
where Greade is not null
18、查询计算机系年龄在22岁以下的学生的姓名
select Sname from Student
where Sdept='计算机'and Sage<22
19、查询选修了课程2的学生的学号及其成绩,查询结构按分数的降序排列
select Sno,Greade from SC where Cno='2'
order by Greade desc
20、查询学生的总人数
select Count (*) from Student
21、查询选修课程的学生的总人数
select Count (distinct Sno) from SC
22、计算1好课程的学生的平均成绩
select AVG (Greade) from SC where Cno='1'
23、查询选修了2号课程的学生最高分
select max (Greade) from SC where Cno='2'
24、查询学号为001选修的课程的总学分
select sum (Ccredit) from SC,Course
where Sno='001'and SC.Cno=Course.Cno