-7011: Correlated subquery not allowed 

Explanation:

A correlated subquery was used in a <QUERY EXPRESSION> containing at least a UNION, INTERSECT, or EXCEPT. This is not yet allowed.

User Action:

The desired effect can be achieved by splitting the <QUERY statement> into several SQL statements.