Skip to content

Tag: google-bigquery

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 …

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 qu…