Re: [GENERAL] Problem with sql

2008-10-28 Thread hubert depesz lubaczewski
On Tue, Oct 28, 2008 at 11:36:12PM -0300, x asasaxax wrote: > table_1: product_code, atualization_date > table_2: id, date, value > I need to get the value of table 2 that has the greatest date that is minor > that atualization_date. > The select should return something like that: > unique product_

[GENERAL] Problem with sql

2008-10-28 Thread x asasaxax
Hi everyone, I have two tables: table_1: product_code, atualization_date table_2: id, date, value I need to get the value of table 2 that has the greatest date that is minor that atualization_date. The select should return something like that: unique product_code“s, with their atualization_d