Grupo Postgres em intervalos de 10 minutos
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
Disgusted Dugong