Error Code: 1055 incompatible with sql_mode=only_full_group_by
In 5.7 the sqlmode is set by default to: ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION To remove the clause ONLY_FULL_GROUP_BY you can do this: SET sql_mode=(SELECT REPLACE(@@sql_mode,’ONLY_FULL_GROUP_BY’,”)); This supposed you need to make that GROUP BY with non aggregated columns. Regards