2
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 only searches for what was released before 2010.
I have another table that I want to change a field according to the result of this SELECT
.
In short:
I want to put the column quantidade_estoque = 0
table produto_estoque
for what had a release date prior to 2010.
Both tables have the same field id_grade
.
Have you tried JOIN?
– Marco Souza
@Marconciliosouza, I’ll take a look, but you know if it would work in postgres?
– Giovani
In postgres, I do not know. I had not seen that it was this bank.
– Marco Souza