Last active
September 8, 2020 03:54
-
-
Save AdenForshaw/45baa9bdabf2a99098aff8ef9a1e989d to your computer and use it in GitHub Desktop.
[BigQuery row for each date in range] Generates a row for every date in a range with day of week #bigquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with dates as ( | |
SELECT day, | |
FORMAT_DATE('%A', day) AS dow | |
FROM UNNEST( | |
GENERATE_DATE_ARRAY(DATE('2020-02-01'), DATE('2020-02-29'), INTERVAL 1 DAY) | |
) AS day | |
) | |
select * from dates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment