根据关系模型Students(学号,姓名,性别,专业,成绩),统计学生的平均成绩应使用的SQL语句是______。
A: SELECT AVG(成绩)FROM Students
B: SELECT COUNT(成绩) FROM Students
C: SELECT COUNT(*) FROM Students
D: SELECT AVG(*) FROM Students
A: SELECT AVG(成绩)FROM Students
B: SELECT COUNT(成绩) FROM Students
C: SELECT COUNT(*) FROM Students
D: SELECT AVG(*) FROM Students
举一反三
- 【单选题】根据关系模型Students(学号,姓名,性别,出生年月),查询计算机专业学生的学号、姓名和专业______。 A. SELECT 学号、姓名、专业 FROM Students WHERE 专业="计算机" B. SELECT 学号、姓名、专业 FROM Students WHERE 专业=计算机 C. SELECT 学号,姓名,专业 FROM Students WHERE 专业="计算机" D. SELECT 学号,姓名,专业 FROM Students WHERE 专业=计算机
- 第4单元,设有学生表student(学号,姓名,系名,课程号,成绩),查询至少选修了4门课程的学生学号及平均成绩的正确语句是() A: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>3; B: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(课程号)>3; C: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>4; D: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(DISTINCT 学号)>3;
- 计算“赵国柱”同学选修的所有课程的平均成绩,正确的SQL 语句是( )。 A: SELECT AVG(成绩) FROM 选课 WHERE 姓名="赵国柱" B: SELECT AVG(成绩) FROM 学生,选课 WHERE 姓名="赵国柱" C: SELECT AVG(成绩) FROM 学生,选课 WHERE 学生.学号=选课.学号 AND 姓名="赵国柱" D: SELECT AVG(成绩) FROM 学生,选课WHERE 学生.姓名="赵国柱"
- 雨课堂: 根据关系模型Students(学号,姓名,性别,专业),SQL语句:SELECT * FROM Students WHERE '姓名' = 李明; 是语法正确的。
- 如下⼏个表所示学⽣、课程、必修课和选课关系,⽤SQL语⾔实现下列操作。列出各⻔课的平均成绩、最⾼成绩、最低成绩和选课⼈数。正确的SQL语句是( )。 A: SELECT 课号,AVG(成绩),MAX(成绩),MIN(成绩),COUNT(学号) FROM 选课 GROUP BY 课号; B: SELECT 课号,AVG(成绩),MAX(成绩),MIN(成绩),COUNT(学号) FROM 选课 ORDER BY 课号; C: SELECT 课号,AVG(成绩),MAX(成绩),MIN(成绩),COUNT(学号) FROM 选课 WHERE 课号; D: SELECT 课号,AVG(成绩),MAX(成绩),MIN(成绩),COUNT(学号) FROM 选课 HAVING 课号;