handling nested aggregate expressions.