Re: Calculating the median

From: Miguel Cruz <>
Date: Mon, 04 Dec 2000 18:07:02 GMT
Message-ID: <a3RW5.10250$>

In article <>, <> wrote:
>> select a/b from
>> (select sum(the_column) as a, count(the_column) as b
>> from the_table where the_column is not null);
> This is the average. The median is the value in the middle of your numbers.

You're right, I wasn't paying attention. I suspect you could piece together enough rownum-based subselects to do this but it would be a nuisance. Now the mode, that I can do.

miguel Received on Mon Dec 04 2000 - 19:07:02 CET

Original text of this message