PostgreSQL按年月日分组(关键词:extract time as Year/Month/Day)
Select
EXTRACT(year from cast(joindate as timestamp)) as Year,
EXTRACT(month from cast(joindate as timestamp)) as Month,
EXTRACT(day from cast(joindate as timestamp)) as Day,
......
From Table
Group by Year,Month,Day
此博客只是为了记忆相关知识点,大部分为网络上的文章,在此向各个文章的作者表示感谢!

浙公网安备 33010602011771号