Thanks, as I am new to postgres, I was unaware of this function.
To go with this, I guess I will need a table with which to store intervals, start and end dates?
eg
CREATE table events(
id serial primary key,
start_timestamp timestamp,
end_timestamp timestamp,
interval
with dateRange as
(
SELECT min(start_timestamp) as first_date, max(start_timestamp) as last_date
FROM events
)
select
generate_series(first_date, last_date, '1 hour'::interval)::timestamp as date_hour
from dateRange;
or something??
Kind regards
Kevin