This is my query:
SELECT u_id, created_date,
COUNT(u_id) AS count_total
FROM table
WHERE statement='this'
GROUP BY DAY(created_date)
ORDER BY created_date ASC
The error that I get is:
Query error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column.
I've read this post but I don't know how to get this working, as now the problem seems to be the addition of DAY.
I've tried changing the SELECT
statement to:
SELECT u_id, ANY_VALUE(created_date) as test_date
but that didn't work.