Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: @HELP
"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
![]() |
![]() |