X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 912E152D3A for ; Tue, 2 Aug 2005 15:34:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73261-10 for ; Tue, 2 Aug 2005 18:34:47 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by svr1.postgresql.org (Postfix) with ESMTP id 17E81529A4 for ; Tue, 2 Aug 2005 15:34:45 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i4so1273199wra for ; Tue, 02 Aug 2005 11:34:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=H1PQNKDB2NEkaBaicjxEPAxc2Sz8cs8143rZfp0sMB04cJW/i9XBagviQgmR7+UD6YXVyAgqKWA8MugAo8JhRJACh88ed23SV+K+whWfQ0Dyj7WvVsBVolayS9djFCf4ot2VfZAsdxA+zgLWm7TbUD0Abx7PM786aUcxo7JoIkA= Received: by 10.54.8.60 with SMTP id 60mr3995681wrh; Tue, 02 Aug 2005 11:34:46 -0700 (PDT) Received: by 10.54.124.17 with HTTP; Tue, 2 Aug 2005 11:34:45 -0700 (PDT) Message-ID: <2bffcc3305080211342745b1ab@mail.gmail.com> Date: Tue, 2 Aug 2005 14:34:46 -0400 From: Henry Ortega Reply-To: Henry Ortega To: Pgsql-sql@postgresql.org Subject: Breakdown results by month Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200508/11 X-Sequence-Number: 22239 I have the ff table: id | total | effective | end_date john 6 01-01-2005 02-28-2005 john 8 03-01-2005 06-30-2005 How can I return: id | total | effective | end_date john 6 01-01-2005 01-31-2005 john 6 02-01-2005 02-28-2005 john 8 03-01-2005 03-31-2005 john 8 04-01-2005 04-30-2005 john 8 05-01-2005 05-31-2005 john 8 06-01-2005 06-30-2005 Any help would be appreciated. Thanks