已知三个关系: S(SNO,NAME,SEX,CLASS);C(CNO,CNAME,TIME); SC(SNO,CNO,DEGREE) 若要查询统计每门课各班的平均成绩和每门课的平均成绩以及总的平均成绩,下列语句正确的是()

A、select class, cname, avg(degree) as平均分from s, sc, c where s.sno=sc.sno and c. cno=sc.cno group by s.class, c. cname with rollup B、select class, cname, avg(degree) as平均分from s, sc, c where s.sno =sc.sno and c. cno =sc. cno group by s. class, c. cname with cube C、select class, cname, avg(degree) as平均分 from s, sc, c where s.sno =sc. sno and c. cno =sc. cno group by c. cname, s.class with cube D、select class, cname, avg(degree) as 平均分from s, sc, c where s. sno =sc. sno and c. cno =sc. cno group by c. cname, s.class with rollup

时间:2024-04-12 15:03:13

相似题目