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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to