解决mysql查询问题:this is incompatible with sql_mode=only_full_group_by
mysql5.7版本以后,groupby的规则有点变化。首先查看sql_mode的值select@@GLOBAL.sql_mode;结果为:ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBST