Skip to content
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's only_full_group_by and any_value #1

Open
biluohc opened this issue Jun 19, 2020 · 1 comment
Open

MySql's only_full_group_by and any_value #1

biluohc opened this issue Jun 19, 2020 · 1 comment

Comments

@biluohc
Copy link
Owner

biluohc commented Jun 19, 2020

error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'd.time' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

https://www.cnblogs.com/Wayou/p/mysql_group_by_issue.html

Modify sql_mode or use any_value:

SELECT gender, 
-       last_name
+       ANY_VALUE(last_name) 
FROM   employees 
GROUP  BY gender 
@biluohc biluohc closed this as completed Jun 20, 2020
@biluohc biluohc reopened this Jun 20, 2020
@biluohc
Copy link
Owner Author

biluohc commented Jun 20, 2020

Repository owner deleted a comment Feb 15, 2024
@github-staff github-staff deleted a comment Apr 26, 2024
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

No branches or pull requests

1 participant