The SQL statement contains too many subqueries. The number of permissible subqueries depends on the kind of SQL statement.
Subqueries were specified in a table expression both in the WHERE clause and in the HAVING clause of an SQL statement containing at least one corresponding subquery. This is not allowed.
Simplify the SQL statement or split it into several SQL statements.