Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'kindergarten.n.stuMChkTime' which is not functionally dependent on columns in GROUP BY clause; this is in

错误原因:

​ sql _mode中only _full _group _by不兼容的问题

解决思路:

​ 既然是only _full _group _by不兼容,那就把它去掉就好啦

show variables like "sql_mode"; 

set sql_mode='';
set sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
原文地址:https://www.cnblogs.com/qianzf/p/11269199.html