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: Michel Cadot <micadot_at_netcourrier.com>
Date: Fri, 17 Dec 1999 11:22:35 +0100
Message-ID: <83d2a7$2veps$1@oceanite.cybercable.fr>


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?

--
Have a nice day
Michel

Jonus <jonus123_at_yahoo.com> a écrit dans le message : 83bd5a$c1q$1_at_nnrp1.deja.com...
> hi
>
> I'm trying to get to the middle values of a column of
> a group of integers. For example, in a table of 470321 rows, I'm trying
> to get the row exactly in the middle. Is there a way to get to the
> middle value in a query, without having to do a manual
> count. There doesn't seem to be a way or I can't
> find any reference to how to do this.
>
> Thanks for any help you can give me
> Jonus
>
>
> for example:
>
> cost
> ----
> 4555
> 4556
> 5666
> 9456
> 6676
> 877
> 8888
> 687
> 4467
> 3452
> .
> .
> .
> .
> etc
>
>
>
>
> --
> Someone pass a cork to plug the hole in my head
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Dec 17 1999 - 04:22:35 CST

Original text of this message

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