with stackoverflow sql_mode questions only_full_group_by only incompatible full error disable desactivar deactivate mysql sql aggregate mysql-error-1055

mysql - stackoverflow - La lista SELECT no se encuentra en la cláusula GROUP BY y contiene una columna no agregada



sql_mode only_full_group_by mamp (2)

Como @Brian Riley ya dijo que debería eliminar 1 columna en su selección

select countrylanguage.language ,sum(country.population*countrylanguage.percentage/100) from countrylanguage join country on countrylanguage.countrycode = country.code group by countrylanguage.language order by sum(country.population*countrylanguage.percentage) desc ;

o añádelo a tu agrupación

select countrylanguage.language, country.code, sum(country.population*countrylanguage.percentage/100) from countrylanguage join country on countrylanguage.countrycode = country.code group by countrylanguage.language, country.code order by sum(country.population*countrylanguage.percentage) desc ;

Esta pregunta ya tiene una respuesta aquí:

Recibiendo el siguiente error:

Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ''world.country.Code'' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Al ejecutar la siguiente consulta:

select countrylanguage.language, country.code, sum(country.population*countrylanguage.percentage/100) from countrylanguage join country on countrylanguage.countrycode = country.code group by countrylanguage.language order by sum(country.population*countrylanguage.percentage) desc ;

Uso de la base de datos de prueba de MySQL world ( http://dev.mysql.com/doc/index-other.html ). No tengo idea de por qué esto está sucediendo. Actualmente ejecutando MYSQL 5.7.10.

¿¿¿Algunas ideas??? : O