Skip to content

Tag: google-bigquery

Convert day of year & year to date Big Query

I have some data which instead of having a date field, contains the day of the year as a number and the year as a number in different columns. I have tried using big query functionality PARSE_DATE to achieve this by using PARSE_DATE(“%Y %j”, “2020 258”) but this does not work. When che…

BigQuery SQL conditional IN

I have been trying to construct a conditional IN like below, but this gives me the scalar subquery produced more than one element error. How should I approach this type of query instead? The tables are not related. Answer Try this below- As your other tables are not related, you can try this below logic-