I'm using the MySQL language and am trying to group a profession table with GROUP BY
through the query below.
SELECT name, occupation FROM OCCUPATIONS GROUP BY occupation;
But I get this error when trying to group the professions.
ERROR 1055 (42000) at line 2: Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'run_bcxfn77ibag.OCCUPATIONS.Name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode = only_full_group_by
The table is very simple and has this format
Thetablehasthename
andoccupation
columns.
Iunderstoodthattheerrorsayssomethingabouttheregistryisinlistformed.
ButwhenIdoabriefconsultationoftheprofessions,itreturnsmethis:
Why does this happen?