Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: @HELP

Re: @HELP

From: TurkBear <johng_at_mm.com>
Date: Fri, 17 Dec 1999 15:12:18 GMT
Message-ID: <385a5055.1642061@super.news-ituk.to>


"Michel Cadot" <micadot_at_netcourrier.com> wrote:

>The middle value of a column is given by:
>select (max(cost)+min(cost))/2 from <table>;
>
>and the rows with this value with:
>select * from <table> where
>cost = (select (max(cost)+min(cost))/2 from <table>);
>
>or do you mean something else?

Wouldn't that select statement only work if there was an actual value that satisfied the formula...moreover the formula assumes a level and consistent distribution of values between min and max : Given:
1000
730
500
215
100
32

the formula would return 516 as the middle value - this is not the median which means -Numerically, half of the rows will have values that are equal to or larger than the median and half will have values that are equal to or smaller than the median.

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------    http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==----- Received on Fri Dec 17 1999 - 09:12:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US