Add aggregation query for $avg