X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3C13CD1B49E for ; Thu, 19 Feb 2004 21:06:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 22513-07 for ; Thu, 19 Feb 2004 17:06:52 -0400 (AST) Received: from mail-s03.websys.aol.com (mail-s03.websys.aol.com [64.12.180.167]) by svr1.postgresql.org (Postfix) with ESMTP id 1C81CD1B456 for ; Thu, 19 Feb 2004 17:06:48 -0400 (AST) Received: from inf-s24.websys.aol.com (inf-s24.websys.aol.com [172.20.116.86]) by mail-s03.websys.aol.com (8.12.10/8.12.9) with ESMTP id i1JL6nUq024228 for ; Thu, 19 Feb 2004 16:06:49 -0500 (EST) Received: from aol.net (dhcp178-176-84.office.aol.com [10.178.176.84]) by inf-s24.websys.aol.com (8.12.10/8.12.9) with ESMTP id i1JL6i9c000212 for ; Thu, 19 Feb 2004 16:06:44 -0500 (EST) Message-ID: <40352541.8040507@aol.net> Date: Thu, 19 Feb 2004 16:06:09 -0500 From: Brian Knox User-Agent: Mozilla Thunderbird 0.5 (X11/20040209) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: DISTINCT ON troubles References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/289 X-Sequence-Number: 16979 ( sorry if this is a repeat, my mail server is being wonky today ) I'm looking for a way, within SQL, given a starting date and an ending date, to get back the number of months between the start and end date. If I "SELECT end_date - start_date", I get back an interval in days; I need months. Thanks for any suggestions, Brian