Personal to doing a query in 3 tables with inner join, follows the code:
select
itensVenda.idVenda, itensVenda.idProd, itensVenda.qtd,
produtos.id, produtos.descricao, produtos.foto,
venda.id, venda.valor
from produtos
INNER JOIN itensVenda ON produtos.id = itensVenda.idProd
INNER JOIN venda ON itensVenda.idVenda = venda.id
So far so good is taking everything, what I would like:
I have in the items sale two id sell same in the last release, how can I redeem this release showing me the last idVenda?
example: I have two id sale 0009 and wanted to unite them