I am trying to run a query but I am getting the following error:
SQL Error (1055): Expression #14 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gamesmart.gps.plays' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
When I check my sql_mode
it is set to the following for both session
and global
:
So, why is it still giving me this error?
Mysql Version: 5.7.14
Here are two options that I found that worked (I was able to do one or the other):
ifnull(gps.plays,0)
to thisifnull(gps.plays,0) as plays
in the select clause..ini
file set the following:In your terminal:
Then type your password. It will bring you to the MySQL monitor.
Write this query:
After that, go to etc/mysql/my.cnf, open the file, and paste the code below the line.
It worked for me.
Try to resolve the Query due to 5.7 Requirements: