Skip to content

Instantly share code, notes, and snippets.

@zabih-alipour
Created July 10, 2019 08:45
Show Gist options
  • Save zabih-alipour/090943843f5a9361059a8cdd9afe420d to your computer and use it in GitHub Desktop.
Save zabih-alipour/090943843f5a9361059a8cdd9afe420d to your computer and use it in GitHub Desktop.
WITH cte AS (
SELECT current_date - (n || ' day')::INTERVAL AS date
FROM generate_series(0, 29) n
)
SELECT date
FROM cte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment