select cast(chirp.timestamps as date),count(chirp.cid)
from chirp
where chirp.timestamps > (select now() - interval 1 month)
group by cast(chirp.timestamps as date)
order by chirp.timestamps desc'1 month' 去掉单引号,group by 和order by 互换位置就可以了
from chirp
where chirp.timestamps > (select now() - interval 1 month)
group by cast(chirp.timestamps as date)
order by chirp.timestamps desc'1 month' 去掉单引号,group by 和order by 互换位置就可以了
from chirp
where chirp.timestamps > (select now() - interval '1 month')
group by cast(chirp.timestamps as date)
order by chirp.timestamps desc错误: 字段 "chirp.timestamps" 必须出现在 GROUP BY 子句中或者在聚合函数中使用
LINE 5: order by chirp.timestamps desc
^
from chirp
where chirp.timestamps > (select now() - interval '1 month')
group by cast(chirp.timestamps as date)
order by 1 desc