假设有scores表的设计如下:StudentID(学生编号),Class(班级),CourseID(课程编号),Score(分数)
(1)查询参加过至少两门课程考试的学生各门课程的平均成绩,以下SQL语句正确的是
A. select StudentID,avg(score) from scores group by StudentID having count(studentID)>=2
B. select StudentID,avg(score) from scores group by StudentID where count(studentID)>=2
C. select StudentID,avg(score) from scores where count(studentID)>=2 group by StudentID
D. select StudentID,avg(score) from scores having count(studentID)>=2 group by StudentID