What is the equivalent of PostgreSQL’s GREATEST('2020-01-01'::date, start_date) in BigQuery? PostgreSQL’s syntax for the GREATEST function does not work in BigQuery.
In BigQuery, the equivalent of PostgreSQL’s GREATEST('2020-01-01'::date, start_date) is:
GREATEST(DATE '2020-01-01', start_date)
(DATE '2020-01-01') is the correct literal format for a date in BigQuery not ('2020-01-01'::date).