Added aggregate function (performs stats for multiple fields)