From: Martin Haltmayer <Martin_Haltmayer@KirchGruppe.de>
Subject: Re: Median function in SQL
Date: 1998/03/03
Message-ID: <34FBD172.BB480B3B@KirchGruppe.de>#1/1
Content-Transfer-Encoding: 7bit
References: <01bd4482$5787d980$c1015c91@KMERRITT.GENEVACO.COM> <34FAB309.67E6AE54@KirchGruppe.de> <34FAB6F4.3E03@nospambtinternet.com>
To: Steve Jelfs <s.jelfs@nospambtinternet.com>
Content-Type: text/plain; charset=us-ascii
Organization: KirchGruppe
Mime-Version: 1.0
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.server,comp.databases.oracle.tools



Sorry, I had the wrong notion of median value. I will think about it. Thanks for
your clue.

Martin Haltmayer

Steve Jelfs wrote:
> 
> Martin Haltmayer wrote:
> >
> > I am not sure, but
> >
> > SELECT (MIN (revenue) + MAX (revenue)) * 0.5 ...
> >
> > might do the trick.
> >
> > Martin Haltmayer
> >
> 
> I don't think so, in this group 1,2,10;  2 is the median but your
> algorhithm returns 5.5!
> 
> Sj
> 
> > Kevin Merritt wrote:
> > >
> > > Does anyone have any idea how to implement a MEDIAN function in Oracle? For
> > > example, I would like to perform the following SQL SELECT statement:
> > >
> > >         SELECT MEDIAN(revenue) FROM company_financials WHERE revenue > 1000000
> > >
 

