假设有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 group by StudentID where count(studentID)>1 group by StudentID
D.
select StudentID,avg(score) from scores having count(studentID)>1