How to convert the Oracle code below to BigQuery?
max(to_date(BIC_GM_AGCPOAODS00_BO_VW.BOUND_DATE,'yyyymmdd'))
When I try this code:
SELECT A._BIC_GCISBN,
max(cast(A.BOUND_DATE as date),'yyyymmdd')
FROM `BIC_GM_AGCPOAODS00_BO_VW` A
WHERE A._BIC_ZC2GRIRIN = 'G' AND A._BIC_ZCLOEKZ = ' '
GROUP BY A._BIC_GCISBN
I am get the error:
No matching signature for aggregate function MAX for argument types: DATE, STRING. Supported signature: MAX(ANY) at [15:2]
varchar? That's a really bad idea