Skip to content

Conversation

lzyslh
Copy link

@lzyslh lzyslh commented Sep 27, 2021

The solution for exercise 5 didn't work for me, it returned an error, so I thought that I could submit a fix. Thank you.

@Aunty-Nitty
Copy link

I also got an error. It worked if I grouped by bands.name. The method proposed by another member using WHERE worked for me and seemed like a more straightforward way of doing it.

@lingyutan
Copy link

The solution for exercise 5 didn't work for me either and the error was returned as follow:

Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'record_company.bands.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by.

It should be working if you replace the 4th command line
"GROUP BY albums.band_id"
by
"GROUP BY bands.id".

I personally think it might be due to albums.band_id is NULL which is not acceptable in MySQL. Also, WHERE is more straightforward in this case as @lzyslh mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants