如果对关系执行下面的SQL语句:SELECT[’sno,AVG(grade)AS‘平均成绩’FROM scoreGROUP BY sno HAVING AVG(grade)=85,对此结果的正确描述是——。A.查找平均成绩在85分以上的学生B.查找score表中各科成绩在85分以上的学生C.查找score表中平均成绩在85分以上的学生的学号和平均成绩D.查找score表中各科成绩在85分以上的学生的学号和平均成绩

如果对关系执行下面的SQL语句:SELECT[’sno,AVG(grade)AS‘平均成绩’FROM scoreGROUP BY sno HAVING AVG(grade)>=85,对此结果的正确描述是——。

A.查找平均成绩在85分以上的学生

B.查找score表中各科成绩在85分以上的学生

C.查找score表中平均成绩在85分以上的学生的学号和平均成绩

D.查找score表中各科成绩在85分以上的学生的学号和平均成绩


相关考题:

关系SC(Sno,Cno,Grade)表示学号,课程号,成绩。现要查询平均分在90分以上的学生的学号和平均成绩,正确的语句是______。A.SELECT Sno,AVG(Grade) FROM SC WHERE AVG(Grade)>=90 GROUP BY SnoB.SELECT Sno,AVG(Grade) FROM SC GROUP BY Sno HAVING AVG(Grade)>=90C.SELECT Sno,AVG(Grade) FROM SC WHERE AVG(Grade)>=90 ORDER BY SnoD.SELECT Sno,AVG(Grade) FROM SC GROUP BY Cno HAVING AVG(Grade)>=90

设有关系SC(sno, cno, grade)。执行SQL语句:SELECT sno, AVG(grade)FROM SC GROUP BY sno的结果中的元组数是A.1B.2C.3D.4

有学生选课表SC(Sno,Cno,Grade),各属性为学号,课程号,成绩;完成SQL语句:找出每个学生超过他选修课平均成绩的课程号。SELECT Sno,CnoFROM SC XWHERE _______(SELECT ______FROM SC Y______ );

如下的SQL语句是用于查询“每个学生的选修课程数、总成绩、平均成绩”的不完整语句,请在空缺处填入正确的内容。SELECT Student.SNo, (1),SUM(Grade),AVG(Grade)FROM Student,GradeWHERE Student.SNo=Grade.SNo,GROUP BY (2);(1)

学生选课关系模式为SC(Sno,Cno,Grade),其中Sno为学号,Cno为课程号,Grade为成绩,SQL查询语句如下:SELECT SnoFROM SC SCXWHERE NOT EXISTS(SELECT *FROM SC SCYWHERE SCY.Sno='1042' AND NOT EXISTS(SELECT *FROM SC SCZWHERE SCZ.Sno=SCX.Sno AND SCZ.Cno=SCY.Cno));与该查询等价的元组演算表达式为{t|(54)(Sc(u)∧SC(v)∧(55)∧t[1] =u[1])。A.B.C.D.

设学生选课关系模式为SC(Sno,Cno,Grade),其中,Sno为学号,Cno为课程号, Grade为成绩,SQL查询语句如下:SELECT SnoFROMSC SCXWHERE NOT EXISTS(SELECT*FROM SC SCYWHERE SCY.Sno='1042'AND NOT EXISTS(SELECT *FROMSCSCZWHERE SCZ.Sno=SCX.Sno AND SCZ.Cno=SCY.Cno));与该查询等价的元组演算表达式为{t|(13)(SC(u)∧SC(v)∧(14)∧t[1]= u[1])}。A.B.C.D.

17、下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“找出每个学生超过他选修课程平均成绩的课程号”。A.SELECT Sno,Cno FROM SC x WHERE Grade >=(SELECT AVG(Grade) FROM SC y WHERE y.Sno=x.Sno)B.SELECT Sno,Cno FROM SC x WHERE (SELECT AVG(Grade) FROM SC y WHERE y.Sno=x.Sno)<=GradeC.SELECT Sno,Cno FROM SC WHERE Grade >=(SELECT AVG(Grade) FROM SC )D.SELECT x.Sno,x.Cno FROM SC x, SC y WHERE y.Sno=x.Sno AND x.Grade >=(SELECT AVG(Grade) FROM y)

统计选修课的学生总数和考试的平均成绩A.select count(distinct(sno)) as 学生总数,avg(grade) as 平均成绩 from scB.select count(sno) as 学生总数,avg(grade) as 平均成绩 from scC.select count(sno) as 学生总数,avg(grade) as 平均成绩 from sc group by snoD.select distinct count(sno) as 学生总数,avg(grade) as 平均成绩 from sc

26、下列SQL语句中,_________可以在“学生-课程”数据库正确实现“将学生的学号及他的平均成绩定义为一个视图”。A.CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SC GROUP BY Sno;B.CREAT VIEW S_G(Sno,AVG(Grade)) AS SELECT Sno,AVG(Grade) FROM SC GROUP BY Sno;C.CREAT VIEW S_G AS SELECT Sno,AVG(Grade) FROM SC GROUP BY Sno;D.CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SC ORDER BY Sno;