Last active
March 23, 2021 16:03
-
-
Save lacerogers20/e8cde72185a31ecf3e1456ce4d5f800c to your computer and use it in GitHub Desktop.
create a simple BigQuery table if the table does not exist
This file contains hidden or 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
CREATE TABLE IF NOT EXISTS `testing.insert` AS | |
( | |
SELECT | |
date, | |
COUNT(DISTINCT(visitid)) AS unique_visits | |
FROM | |
`bigquery-public-data.google_analytics_sample.ga_sessions_*` | |
WHERE | |
_table_suffix = '20170801' | |
GROUP BY | |
1) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment