📜  postgres 以 10 分钟为间隔分组 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:09.005000             🧑  作者: Mango

代码示例1
SELECT COUNT(*) cnt, 
to_timestamp(floor((extract('epoch' from timestamp_column) / 600 )) * 600) 
AT TIME ZONE 'UTC' as interval_alias
FROM TABLE_NAME GROUP BY interval_alias