假设有表scores的设计如下:ID(编号,主键),StudentID(学生编号),CourseID(课程编号),Score(分数).现在要查询参加过至少两门课程考试的学生的各门课程的平均成绩。以下sql语句正确的是(选一项)()

A.Select studentID, avg(score) from scores group by studentID having count(studentID)>1 B.Select studentID, avg(score) from scores group by studentID where count(studentID)>1 C.Select studentID, avg(score) from scores where count(studentID)>1 group by studentID D.Select studentID, avg(score) from scores having count(studentID)>1

时间:2023-10-16 12:32:15

相似题目