I had a certain MYSQL query that was working correctly.
This is the query:
SELECT *, count(*) as count FROM 'post_hashtags'
WHERE 'created_at' BETWEEN ? AND ?
AND (SELECT count(*) AS 'aggregate'
FROM 'post'
WHERE 'post'.'id' = post_hashtags.post_id
AND 'status' = 0
AND 'post_privacidade_id' = 1) >= ?
GROUP BY 'hashtag'
ORDER BY 'count' DESC, created_at DESC
LIMIT 5
But after upgrading Mysql to version 5.7 on my machine, I started getting this error:
Syntax error or access violation: 1055 Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'post_hashtags.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode = only_full_group_by
Does anyone know what's going on? I've never received this message before.
Something is considered wrong in the query, for the new version of the Mysql?