Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Mean/Median - Another method
Another way to compute median is here:
1. You should know that there is a linear relationship between Mean, Median
and Mode. Find that relationship.
2. Find the mean of the data. Its nothing but the average.
3. Next you have find the mode. Mode is nothing but the most frequent
data. suppose, sal is the column for which you want to find the median,
then proceed like this -
select sal, count(*) Number_of_people
from emp
group by sal
order by 2 Desc;
Now the first record returned by the above query represents the mode. Caputure the sal from this first record and call it as mode. 4. Now, Using the relationship u determined in step 1, calculate the median values by substituting the mode and mean values.
PS: I know this is going to work is salary is an interger field. But I doubt it if its a real number.
Listers,letme know if I am wrong. Also, I did not watch earlier mails on this topic,. so, pardon me if its a repeat.
Rajaram.
-----Original Message-----
From: Eric D. Pierce [SMTP:PierceED_at_csus.edu]
Sent: Tuesday, May 15, 2001 3:36 PM
To: Multiple recipients of list ORACLE-L Subject: RE: Mean/Median
HELP
> Are you stupid?
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Eric D. Pierce INET: PierceED_at_csus.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). NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rajaram INET: rajaram_k_at_netzero.net 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 - 17:39:12 CDT