I have a reasonably complex dataset being pulled into BigQuery table via an Airflow DAG which cannot easily be adjusted. This job pulls data into a table with this format: | Line_item_id | Device …
Tag: bigquery-standard-sql
SQL: how to pivot dimensions in a column?
I’m looking to do the following: Raw table: this has just two articles, their traffic channels, and unique pageviews SELECT * FROM website_content_table Returns: I want to return a table that …
Isolate/Sum Data Conditionally Based On Event Sequence
I have a table that tracks events sequentially and calculates the time for each event. What I want to do using the below sample data, is calculate the total number of Time Elapse (Seconds) of all …
Error: No matching signature for function IF for argument types: BOOL. Supported signature: IF(BOOL, ANY, ANY)
I’m trying to count the number of times a “rating” is above 9. Working in Google BigQuery with StandardSQL I previously was using a CASE WHEN function but wanted to change it to an IF as there is …
Rolling 90 days active users in BigQuery, improving preformance (DAU/MAU/WAU)
I’m trying to get the number of unique events on a specific date, rolling 90/30/7 days back. I’ve got this working on a limited number of rows with the query bellow but for large data sets I get …