Supporting GROUP BY and subqueries in FROM clauses..