Breakdown results by month

From: Henry Ortega <juandelacruz(at)gmail(dot)com>
To: Pgsql-sql(at)postgresql(dot)org
Subject: Breakdown results by month
Date: 2005-08-02 18:34:46
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-08-02 20:57:09 Re: Make year 01/01/0001 but leave timestamp alone
Previous Message John DeSoi 2005-08-02 16:35:56 Re: Make year 01/01/0001 but leave timestamp alone