countered in the sort. select owner, accountName, CloseDate, amount, percentile_cont(0.5) within group (order by amount) over (partition by owner) pct_cont, percentile_disc(0.5) within group (order by amount) over (partition by owner) pct_disc from opportunities where stageName='ClosedWon' and closeDate >= '2016-10-02' and closeDate <= '2016-10-09' order by owner, CloseDate; With example results: +--------+----------------+-------------+---------+------------+------------+ | owner | accountName | CloseDate | amount | pct_cont | pct_disc | +--------+----------------+-------------+---------+------------+------------+ | Bill | Babbleopia | 2016-10-02 | 437636. | 437636.470 | 437636.47 | | | | | 7 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Bill | Thoughtworks | 2016-10-04 | 146086. | 437636.470 | 437636.47 | | | | | 1 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Bill | Latz | 2016-10-08 | 857254. | 437636.470 | 437636.47 | | | | | 7 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Chris | Linkbridge | 2016-10-07 | 539977. | 619772.155 | 539977.45 | | | | | 5 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Chris | Avamm | 2016-10-09 | 699566. | 619772.155 | 539977.45 | | | | | 6 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Olivie | Devpulse | 2016-10-05 | 834235. | 667519.110 | 500802.29 | | | | | 3 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ | Olivie | Trupe | 2016-10-07 | 500802. | 667519.110 | 500802.29 | | | | | 9 | 000000 | | +--------+----------------+-------------+---------+------------+------------+ URL: https://mariadb.com/kb/en/window-functions-columnstore-window-functions/