Understanding which queries are valid and which ones aren't can be complicated when a query contains a subquery. Similarly, figuring out what a multi-level query does can also be very involved, and it helps to understand how SQL Anywhere processes subqueries. For general information about processing queries, see Summarizing, Grouping, and Sorting Query Results.
Converting subqueries in the WHERE clause to joins
Quantified comparison test
Set membership test