砸锅卖铁奔小康 2020-04-22 09:54 采纳率: 0%
浏览 3218

1055 - Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column

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;
  • 写回答

3条回答 默认 最新

  • -Leslie-_ 2023-05-04 18:39
    关注

    同问,解决了?

    评论

报告相同问题?