I have the following SQL:
SELECT id_grade
,MAX(data_lancamento)
FROM faturamento_produtos
WHERE data_lancamento < '01-01-2010'
GROUP BY id_grade
Where it does the search only for what was released before 2010.
I have another table that I want to change a field according to the result of this SELECT
.
Summarizing:
I want to put the quantidade_estoque = 0
column of the produto_estoque
table to what had a release date prior to 2010.
Both tables have the same id_grade
field.