Re: Calculating the median
From: Miguel Cruz <mnc_at_admin.u.nu>
Date: Sun, 03 Dec 2000 10:19:36 GMT
Message-ID: <Y6pW5.776$ul.52363_at_typhoon1.ba-dsg.net>
Date: Sun, 03 Dec 2000 10:19:36 GMT
Message-ID: <Y6pW5.776$ul.52363_at_typhoon1.ba-dsg.net>
In article <3A27E3AF.FFA9DB5F_at_weinerfamily.org>, <sw_at_weinerfamily.org> 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