In big-query standard SQL I get the error message:
"Error: Column 7 contains an aggregation function, which is not allowed in GROUP BY at [17:22]
where column 7 is defined in the select clause as follows:-
CASE WHEN MIN(transaction_dttm) = transaction_dttm THEN 'NEW' ELSE 'EXISTING' END AS Fcquisition_Flag
Please note that transaction_date is a timestamp.
Any suggested solutions appreciated.
CASEexpression. You should post the full query. - Tim Biegeleisen