Skip to content

Instantly share code, notes, and snippets.

@isaqueprofeta
Last active August 9, 2021 15:52
Show Gist options
  • Save isaqueprofeta/42807eac78d096488750fed3400d6e7c to your computer and use it in GitHub Desktop.
Save isaqueprofeta/42807eac78d096488750fed3400d6e7c to your computer and use it in GitHub Desktop.
Random timeseries with random data in postgres
SELECT
time,
random()
FROM
generate_series(
NOW() - '24 hour'::interval,
NOW(),
'1 hour'::interval
) time;
ORDER BY time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment