I found several questions / answers about join on the site, but I still can not create the command I need. What I need is the following:
I have the following tables:
item (I have two items registered)
id
descricao
---------------
1 - dipirona
2 - paracetamol
item_details (of these items, I have only dipirone of two different brands)
id
item
marca
-------------------
1 - 1 - medley
2 - 1 - medlab
current item (in stock, I have 1000 brands of one brand and 1500 of another)
id
itemdetalhe
qtd
----------------
1 - 1 - 1000
2 - 2 - 1500
What I need is to generate something like this:
item.id | itemdetalhe.id | item.descricao | itemdetalhe.marca | itematual.qtd
1 1 dipirona medley 1000
1 2 dipirona medlab 1500
2 paracetamol