FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updating a query that didn't work. by lzyslh · Pull Request #3 · WebDevSimplified/Learn-SQL · GitHub

Updating a query that didn't work. - #3

Open
lzyslh wants to merge 1 commit into
WebDevSimplified:masterfrom
lzyslh:master
Open

Updating a query that didn't work.#3
lzyslh wants to merge 1 commit into
WebDevSimplified:masterfrom
lzyslh:master

Conversation

lzyslh commented Sep 27, 2021

Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL