#1055 – Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by

I had a struggle getting this to work i’ve tested it and it’s working on lamp server mysql version 5.12 So, steps to success: sudo vim /etc/mysql/conf.d/mysql.cnf Scroll to the bottom of file Copy and paste [mysqld] sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION to the bottom of the file save and exit input mode sudo service mysql restart to restart … Read more

Is there ANY_VALUE capability for mysql 5.6?

You’re misusing the notorious nonstandard MySQL extension to GROUP BY. Standard SQL will always reject your query, because you’re mentioning columns that aren’t aggregates and aren’t mentioned in GROUP BY. In your dev system you’re trying to work around that with ANY_VALUE(). In production, you can turn off the ONLY_FULL_GROUP_BY MySQL Mode. Try doing this: … Read more

MySQL : isn’t in GROUP BY

You need to have a full group by: SELECT `name`, `type`, `language`, `code` FROM `users` WHERE `verified` = ‘1’ GROUP BY `name`, `type`, `language`, `code` ORDER BY `count` DESC LIMIT 0, 25 SQL92 requires that all columns (except aggregates) in the select clause is part of the group by clause. SQL99 loosens this restriction a … Read more

SELECT list is not in GROUP BY clause and contains nonaggregated column …. incompatible with sql_mode=only_full_group_by

This Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘returntr_prod.tbl_customer_pod_uploads.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by will be simply solved by changing the sql mode in MySQL by this command, SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,’ONLY_FULL_GROUP_BY’,”)); This too works for … Read more