原解决升级到Mysql5.7后,遇到的group by 查询问题
升级到mysql 5.7后,但进行一些group by 查询时,比如下面的
SELECT *, count(id) as count FROM `news` GROUP BY `group_id` ORDER BY `inputtime` DESC LIMIT 20
就会报如下错误:
SELECT list is not in GROUP BY clause and contains nonaggregated column 'news.id' which is not functionally dependent on …
近期评论