I have this table in MySQL called logou:
id | idconta | day
This query in Mysql always fucnionou on my server:
SELECT dia FROM logou GROUP BY YEAR(dia), MONTH(dia) ORDER BY dia DESC
But now that the system has been to the client server, and everything indicates that it is another version of MySQL or a SQL Server (can it be? Client is from Belgium, and are VERY annoying in talking details of their server), this query displays this error:
Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'eusoucomp-br-qa.logou.dia' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode = only_full_group_by
What can it be? And how to correct?