Skip to content

How to convert an int to DateTime in BigQuery

I have an INT64 column called “Date” which contains many different numbers like: “20210209” or “20200305”. I want to turn those numbers into a date with this format: MM-…

Add the last appearance to table

I have two tables (for example) table1 will contain stores, there are 2 types ‘candy store’ and ‘dental store’. Each row contains information about a customer’s purchase in a particular store table1 ( purchases ): table2 ( type ): I want my query to return a table like this: wher…