mysql报错,显示 1055 - Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'registration.major.MId' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by ,附上我的代码,谁能解决一下谢谢
SELECT course.CName,AVG(register.Score) as 平均成绩,MAX(register.Score) as 最高成绩,MIN(register.Score) as 最低成绩,major.MId,student.SMajor
FROM register,course,major,student
WHERE course.CId=register.CId AND major.MId=student.SMajor
GROUP BY course.CName;