FoundationDB/sql-layer — pull request #1028 by MMcM (2013-11-05 21:33:25+00:00)
Title: Improve handling of subqueries in an aggregate query

The columns of the aggregate query, particularly those in the GROUP BY clause, might appear in the subquery. As will columns from tables inside the subquery itself. The former need to be mapped to columns from the aggregate operator. The latter are left alone, like columns from outer queries were already. See new test case for an example.