Created
June 14, 2023 12:41
-
-
Save allyburns/a6b3a43e8ec092854389d127828d5778 to your computer and use it in GitHub Desktop.
ga_code_0003_query across istraday.sql
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
SELECT DISTINCT(_table_suffix) | |
FROM `example_project.analytics_348840650.events_*` | |
WHERE REGEXT_EXTRACT(_table_suffix, r'[0-9]+') | |
BETWEEN FORMAT_DATE('%Y%m%d',date_sub(CURRENT_DATE(), interval 7 day)) | |
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment