-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL #1
Comments
SELECT bands.name AS 'Band Name' In the last line instead of albums.id there should be albums.band_id so the code should be SELECT bands.name AS 'Band Name' |
Yes, you are right. But why should we use GROUP BY in this situation, wouldn't a simple WHERE return the same result. SELECT bands.name AS 'Band Name' @pranabroygithub What do you think? |
I don't think there is any difference between them as 'id' and 'band_id' will both be NULL after a LEFT JOIN if a band does not have any albums. |
In Sql |
add the bands.name to the group by, like this:
|
Expression WebDevSimplified#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
No description provided.
The text was updated successfully, but these errors were encountered: