Solución a SQLSTATE 42000 Syntax error or access violation: 1055
En este post te mostraré cómo solucionar el error al hacer una consulta en MySQL. Este error viene cuando hacemos un GROUP BY y al menos a mí se me ha presentado de dos formas. La primera es: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘una_columna_de_la_tabla’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by La segunda es: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘una_columna_de_la_tabla’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Veamos cómo solucionar este error 42000 de MySQL. ...