BigQuery SQL to get the Adjusted Closing Price for the Last Trading Day in every Quarter (via dimension date table) WITH ASX_DATA AS ( SELECT 'ASX 200 (XJO)' AS Index ,DT.Date ,DT.Month ,DT.Year ,DT.Quarter