Skip to content

Instantly share code, notes, and snippets.

@viliampucik
Created April 9, 2012 16:43
Show Gist options
  • Save viliampucik/2344646 to your computer and use it in GitHub Desktop.
Save viliampucik/2344646 to your computer and use it in GitHub Desktop.
Random 5-minute Samples
select i * '5 minute'::interval + timestamp '2012-01-01 00:00:00',
trunc(100 * random()::numeric, 2)
from generate_series(0, 24 * 60 / 5 - 1) as t(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment