我有这个查询,我需要更改它以找到 Sum(StudentMark) 的最大值
SELECT Users.UserID,
ClassCourses.CourseID,
sum(StudentMark)SumOFMarks
FROM Users
INNER JOIN UserExams
ON Users.UserID = UserExams.UserID
INNER JOIN Exams
ON UserExams.ExamID = Exams.ExamID
INNER JOIN ClassCourses
ON Exams.ClassID = ClassCourses.ClassID
AND Exams.CourseID = ClassCourses.CourseID
GROUP BY Users.UserID,
ClassCourses.CourseID