Add support for subqueries.