Re: Median and Geometric Mean in Oracle?
From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 11 Nov 1999 10:54:35 -0000
Message-ID: <942317741.27400.0.nnrp-12.9e984b29_at_news.demon.co.uk>
Date: Thu, 11 Nov 1999 10:54:35 -0000
Message-ID: <942317741.27400.0.nnrp-12.9e984b29_at_news.demon.co.uk>
[Quoted] Median is difficult, it's pretty much a procedural thing, so I'll skip that one (for the moment at least)
Is the geometric mean the:
reciprocal of the average of the reciprocals or
the Nth root of the product of N values ?
I think the former would be:
select 1/(sum(1/col)) from tab;
and the latter could be
select exp( sum( ln(col) ) / count(col) ) from tab
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk david_petit_at_yahoo.com wrote in message <80d4pj$q83$1_at_nnrp1.deja.com>...Received on Thu Nov 11 1999 - 11:54:35 CET
>
>I want to calculate the median and G. mean of a group of values. Did
>Oracle provide these two functions?
>
>If not, could anyone tell me how to get the median and G. mean of a
>group of numbers?