-7058: Correlated subquery with select in from clause not allowed
Explanation:
A <QUERY EXPRESSION> specification in the <FROM clause> of a correlated subquery is not allowed.
User Action:
Formulate the corresponding subquery to leave out the QUERY EXPRESSION. If this is not possible, split the SQL statement into at least two SQL statements and generate a named result table that can be used in the <FROM clause>.