Percentile ranks aggregation support

Closes #821