The number of correlated tables used in the correlated subqueries cannot exceed 16 (see Restrictions for SQL Statements).
Try to formulate the SQL statement in such a way that 16 correlated tables are sufficient. Should this not be possible you have to use several SQL statements to achieve the desired effect.