Add support for subqueries
Add the Average aggregate