Support sum/avg grouped queries
Merge branch 'rundata' into skytruth