Re: Calculating the median

From: Miguel Cruz <>
Date: Sun, 03 Dec 2000 10:19:36 GMT
Message-ID: <Y6pW5.776$>

In article <>, <> wrote:
> Given a column of numbers, how do I calculate the median? I don't see a
> function to do it. Do I need to write a procedure?

select a/b from

   (select sum(the_column) as a, count(the_column) as b    from the_table where the_column is not null);

miguel Received on Sun Dec 03 2000 - 11:19:36 CET

Original text of this message