How to export Google Analytics data from BigQuery with standard SQL
This post is an update to “how to export Google Analytics data from BigQuery,” I wrote two years ago. If you are unfamiliar with Google Analytics BigQuery data or would like to review the export process, it is still worth reading.
In June 2016 Google introduced BigQuery, 1.11 wich features a revamped SQL dialect named “standard”. The previous SQL is now called “legacy.”
I thought it would be a good idea to update the BigQuery data export SQL script it to the new “standard.”
Below is a snippet of the SQL query. You can find the complete SQL queries on my GitHub.
Standard SQL
The #standardSQL signals BigQuery the SQL version you are using.
Legacy SQL
The #legacySQL signals BigQuery the SQL version you are using.