Skip to content

Instantly share code, notes, and snippets.

@loburets
Last active January 20, 2024 13:52
Show Gist options
  • Select an option

  • Save loburets/a5a89a2f03a23761368efa832e9518e1 to your computer and use it in GitHub Desktop.

Select an option

Save loburets/a5a89a2f03a23761368efa832e9518e1 to your computer and use it in GitHub Desktop.
In aggregated query without GROUP BY, expression contains nonaggregated; this is incompatible with sql_mode=only_full_group_by
SET GLOBAL sql_mode = (SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
SET SESSION sql_mode = (SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
SELECT @@sql_mode;
@lakshmiprabharamesh
Copy link

Thanks @loburets This, saved me a lot of time.!

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