Tests for subqueries.