Skip to content

Tag: google-bigquery

Determining Where Date Ranks | BigQuery

I have purchase data that I’m trying to analyze. I’m attempting to find the 2nd and 3rd purchases (and potentially 4, 5, etc.) for each user. The data I have currently looks like this: The first order column is looking at what was in the first basket that the customer purchased. Is there a way I c…

Combine / Join SQL queries

I have a query which gets data from a JSON document, checks which values have been returned and then returns that count. As part of this query, I’d like to also return cat_name, dog_name and add a WHERE pet_store = ‘london’ I’m not sure exactly where I’m suppose to add the other …

Count number of values in SQL query / bigquery

I have a query which extracts some data from a JSON document and I have a query that based on the number of values returned displays an overall column count. I can’t seem to work out how to combine these into a single query? assume that I need to use a sub-query but not sure where to go from here?