Search Postgresql Archives

Re: user defined aggregate for percentile calculations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kashmir wrote:
> 
> thx for anwering!,
> 
> i was more looking for a percentile calculation as in http://en.wikipedia.org/wiki/Percentile
> usually i do this in perl with the 'Statistics::Descriptive' module,
> but it would help me alot if i could solve this within the sql query, 
> and would not have to push all the data into a perl arrays first..

Have you considered writing a function in the PL/R language?  It has
percentiles (actually quantiles) and all sorts of useful math stuff.

See http://www.joeconway.com/plr/

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux