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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Mean/Median

RE: Mean/Median

From: Dawn White <DXWhite_at_darden.com>
Date: Tue, 15 May 2001 13:08:30 -0700
Message-ID: <F001.0030416B.20010515122526@fatcity.com>

try this

float salary[100];  

/* populate the host array */  

EXEC SQL EXECUTE
  DECLARE
    TYPE NumTabTyp IS TABLE OF REAL

        INDEX BY BINARY_INTEGER;
    median_salary REAL;
    n BINARY_INTEGER;
...
  FUNCTION median (num_tab NumTabTyp, n INTEGER)     RETURN REAL IS
  BEGIN

-----Original Message-----
Sent: Tuesday, May 15, 2001 3:36 PM
To: Multiple recipients of list ORACLE-L

No,

Median := avg(Max,Min)

 does not work (not for 'even', nor for 'odd' numbers of samples).

Igor Neyman, OCP DBA
Perceptron, Inc.
(734)414-4627
ineyman_at_perceptron.com   

> Oops, this only works for *even* numbers of samples....geez....
>
> || -----Original Message-----
> || From: Mohan, Ross
> || Sent: Tuesday, May 15, 2001 12:28 PM
> || To: 'ORACLE-L_at_fatcity.com'
> || Subject: RE: Mean/Median
> ||
> ||
> || geez louise,
> ||
> || Median := avg(Max,Min)
> ||
> || || -----Original Message-----
> || || From: Pat Hildebrand [mailto:pat_at_ssc.upenn.edu]
> || || Sent: Monday, May 14, 2001 10:56 PM
> || || To: Multiple recipients of list ORACLE-L
> || || Subject: Re: Mean/Median
> || ||
> || ||
> || ||
> || || >
> || || > Any scripts (sql or pl/sql) out there to compute various
> || || statistical things
> || || > in Oracle?
> || || >
> || ||
> || || Would depend on just what you are looking for. A quick look at
> || || Oracle's SQL functions showed avg, st. deviation, and variance
> || || although no median but that should be easier to write than
> || || some of the
> || || others.
> || ||
> || || Pat
> || || --
> || || Please see the official ORACLE-L FAQ: http://www.orafaq.com
> || || --
> || || Author: Pat Hildebrand
> || || INET: pat_at_ssc.upenn.edu
> || ||
> || || Fat City Network Services -- (858) 538-5051 FAX:
> || (858) 538-5051
> || || San Diego, California -- Public Internet access /
> || || Mailing Lists
> || ||
> || --------------------------------------------------------------------
> || || To REMOVE yourself from this mailing list, send an E-Mail message
> || || to: ListGuru_at_fatcity.com (note EXACT spelling of
> || 'ListGuru') and in
> || || the message BODY, include a line containing: UNSUB ORACLE-L
> || || (or the name of mailing list you want to be removed
> || from). You may
> || || also send the HELP command for other information (like
> || subscribing).
> || ||
> ||
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Mohan, Ross
> INET: MohanR_at_STARS-SMI.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Igor Neyman
  INET: ineyman_at_perceptron.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Dawn White
  INET: DXWhite_at_darden.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue May 15 2001 - 15:08:30 CDT

Original text of this message

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