Skip to content
Advertisement

Tag: google-bigquery

Sort COUNT(CASE WHEN) results

I am taking a database of statuses and creating the statuses as columns in order to count how many records from a network exist in each status. I’d love to sort the results based on the Partnered column DESC, but I can’t figure out how or where to do that?? Here’s my code: Here are my results so far. row

Insert into Nested records in Bigquery

Iam using Bigquery to insert nested records into the table but eventually landed into error scenario. Schema: Code: with the above code, I couldn’t able to load the values into table. Please help me by letting know how exactly we can pass values into nested records. Answer Try below instead

Extracting original email and remove email alias in emails

I’m trying to get the primary email from aliases, for example, I have the following examples and I need to normalize them. from “test.me@email.com” to “testme@email.com” from “test+me11@email.com” to “test@email.com” from “test.me.123+22@email.com” to “testme123@email.com” from “test+123@email.com” to “test@email.com” I wrote a SQL statement on bigquery but got an error that says “Third argument in SUBSTR() cannot be negative” Any ideas

Using wildcard in bigquery project name

I am trying to extract some information from all tables in the SALES dataset. I want to run it for multiple clients. Each client has a big query project. Bellow query returns what I want for our London client. How I can use a wildcard to do the same query for the other 10 clients and union all in one

Advertisement