Best way to do this query..

From: "Henry Ortega" <juandelacruz(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Best way to do this query..
Date: 2006-08-25 20:16:07
Message-ID: 2bffcc330608251316g6ed00710u6e43b243800c6087@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have the following:

name effective tstamp rate
John 01-01-2006 2005-12-07 13:39:07.614945 115.00
John 01-16-2006 2006-01-07 13:39:07.614945 125.00
John 01-16-2006 2006-01-09 15:13:04.416935 1885.00

I want the output to be:
name effective end_date rate
John 01-01-2006 01-15-2006 115.00
John 01-16-2006 1885.00

What is the best way to do this? This is on a huge table and what I
have right now is quite slow. Any ideas?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2006-08-25 20:21:45 Re: Best way to do this query..
Previous Message Andrew Sullivan 2006-08-25 10:52:34 Re: RES: Lock Problem