Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres group by 10 minute intervals

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
Source by gis.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #postgres #group #minute #intervals
ADD COMMENT
Topic
Name
2+9 =