Add avg / sum grouping function
Adjust test runtime