Skip to content
Advertisement

Tag: google-bigquery

How to JOIN two table in BigQuery, but the join parameter are nested

sorry for the newbie questions, just started learning SQL. I have two tables: sessions items sessions table has questions (RECORD, Repeated), and inside questions there’s item_id (String) items table has topics (RECORD, Repeated), and inside topics there’s prior_difficulty (String). items table also has item_id (String) My objective is to get a list of sessions and its prior_difficulty, by joining the

I am getting “Function not found: day at [5:84]”

This query results in the following error message: “Function not found: day at [5:84]” The syntax error in my SQL is also underlined as can be seen in this screen shot: Answer As mentioned by @Thorsten and @Samuel, you are getting this error as there is no DAY function in BigQuery. If you want to extract day you can use

get rows that have the same value column

I’m trying to select rows that have the same column values using BigQuery on Githubs public data. I’d approach it like so using SQL server but I am getting “Correlated subqueries that reference other tables are not supported unless they can be de-correlated, such as by transforming them into an efficient JOIN.” error message. I’ve also tried performing self-joins like

BigQuery – Solving a basic grouping/ aggregation error

I wish to output a sum of revenue per year per product, but also include a column with the year of introduction of each product (based on date first ordered). I can not figure out what I am doing wrong here as I can do each calculation separately but not it seems within the same query, I am sure this

How do you swap two attributes in array column on Bigquery?

I have a table with two columns: group_id, students (Array of student). Each student have a two attribute: name and last_name. How do you swap name with last_name for each student? I need to swapping students.name to students.last_name, any idea? Answer Finally, thanks to Mikhail Berlyant who answered this question (Update values in struct arrays in BigQuery), i was able

Advertisement