Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Easily generate timeseries data in PostgreSQL
CREATE TABLE tseries AS
SELECT ts, (random()*9999)::int as count from generate_series(
'2015-01-01'::timestamptz,
'2016-06-01'::timestamptz,
'1 sec'::interval
) date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.