Add sorted value list and median aggregation