Subquery: Any valid SQL++ query can be used as a subquery.
For N1QL users, the following matrix is a quick N1QL compatibility cheat sheet for SQL++.
SQL++ generalizes N1QL's syntax constructs such as USE KEYS, ON KEYS, ON KEY, NEST, LEFT OUTER NEST and ARRAY and thus eliminates cases where must-be-indexed or must-use-keys restrictions are required for certain N1QL queries or expressions to be acceptable. In addition, the general composability of SQL++ queries eliminates the need for some of N1QL's special syntax; for example, SQL++ does not require or support the IN/WITHIN subclauses of N1QL's existential (SOME, ANY, or EVERY) expressions. Note that INSERT/UPSERT/DELETE are not supported at all in the Couchbase Analytics Service. Data is mutated in Couchbase Server, using the Couchbase Server SDK or N1QL mutation, and the mutations will then be automatically synchronized into the Couchbase Analytics Service.