correlated column is not allowed in a non-equality predicate
I am getting the error "correlated column is not allowed in a non-equality predicate" when trying to use "<=" operator in corelated subquery with aggregate. Do we have any other way to avoid this error in spark SQL(Matetrialized view).
WHERE A2.DATE_EFFECTIVE <= C1.DATE_EFFECTIVE
A1 AND A2 are same table with 2 different alias name. A1 AND C1 are from outer query