这里的错误在哪里:
SELECT Users.UserID,
ClassCourses.CourseID,
ClassCourses.MinMark,
sum(StudentMark) as SMark
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
where ClassCourses.MinMark> SMark
group by Users.UserID, ClassCourses.CourseID,ClassCourses.MinMark
我收到一个错误:
列名“SMark”无效。