По сути такой же, как ответ Тима (+1), с некоторой полировкой и полным сценарием для попытки / проверки
CREATE TEMP TABLE client_rates (client VARCHAR, rate INTEGER,
start_date DATE, end_date DATE);
INSERT INTO client_rates VALUES ('A',1000,'2005-1-1','2005-12-31');
INSERT INTO client_rates VALUES ('A',2000,'2006-1-1','2006-12-31');
INSERT INTO client_rates VALUES ('A',3000,'2007-1-1','2007-12-31');
INSERT INTO client_rates VALUES ('B',5000,'2006-1-1','2006-12-31');
INSERT INTO client_rates VALUES ('B',8000,'2008-1-1','2008-12-31');
INSERT INTO client_rates VALUES ('C',2000,'2006-1-1','2006-12-31');
SELECT DISTINCT ON (client) * FROM
(
SELECT client, rate, start_date, end_date,
lag(rate) OVER w1 AS prev_rate,
lag(start_date) OVER w1 AS prev_start_date,
lag(end_date) OVER w1 AS prev_end_date
FROM client_rates
WINDOW w1 AS (PARTITION BY client ORDER BY start_date)
ORDER BY client,start_date desc
) AS foo;
client | rate | start_date | end_date | prev_rate | prev_start_date | prev_end_date
--------+------+------------+------------+-----------+-----------------+---------------
A | 3000 | 2007-01-01 | 2007-12-31 | 2000 | 2006-01-01 | 2006-12-31
B | 8000 | 2008-01-01 | 2008-12-31 | 5000 | 2006-01-01 | 2006-12-31
C | 2000 | 2006-01-01 | 2006-12-31 | | |