运行此查询时出错
SELECT date(updated_at), count(updated_at) as total_count
FROM "persons"
WHERE ("persons"."updated_at" BETWEEN '2012-10-17 00:00:00.000000' AND '2012-11-07 12:25:04.082224')
GROUP BY date(updated_at)
ORDER BY persons.updated_at DESC
我收到错误错误:列“persons.updated_at”必须出现在 GROUP BY 子句中或用于聚合函数第 5 行:ORDER BY people.updated_at DESC
如果我通过调用从组中删除 date( 函数,则此方法有效,但是我正在使用 date 函数,因为我想按日期分组,而不是按日期时间分组
有任何想法吗