On 3/24/16 9:00 AM, Konstantin Knizhnik wrote:
But unfortunately it is not possible to calculate median is such way because percentile_disc is not compatible with OVER:
I don't know if you could use cume_dist()[1] to do this, but even if you can't it probably wouldn't be hard to modify it to do what you need.
[1] http://www.postgresql.org/docs/9.5/static/functions-window.html -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers