-
Notifications
You must be signed in to change notification settings - Fork 292
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
General error: 20018 Column "COLUMN" is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. #185
Comments
The issue is that MySQL has ONLY_FULL_GROUP_BY on my default in newer versions. Not sure what to suggest to fix this other than to rewrite the query. |
I added this to get past it, but this probably needs to be fixed the right way. I'm not that strong in the ways of SQL, or I would make a PR:
|
Hello @incraigulous , Please have your worth credit and shoot a PR to make necessary changes and configurations. Thanks for the workaround. |
It should be worth noting that ONLY_FULL_GROUP_BY makes MySQL better comply with SQL standards. It's probably better to re-write your query.
I added my fields to an array and referenced that array in my select and groupBy which seems to have fixed the problem for me. |
In Laravel I have set the db config strict value to false. |
Hi, I am using the extension and is working whithout problem on mysql. But, when I change to SQL Server connection, it throws me this error:
My code is something like this:
The query that is generated is:
I think the problem is this part:
Because is the only part with GROUP BY statement.
Is something I can do to fix this?
Thanks.
The text was updated successfully, but these errors were encountered: