-1
Guys, I’m breaking into something super simple, but I don’t know where I’m going wrong
Let’s say I have the tables below, all related to each other
tabela1: nota_fiscal (id, data_emissao)
1 '2019-05-12'
2 '2019-02-02'
3 '2019-05-05'
tabela2: itens (id, descricao)
1 'vestuario'
2 'comida'
tabela3: notafiscal_itens (id_nf, id_itens, valor_total)
1 2 50.00
1 1 100.00
2 2 70.00
need to select a SUM (total value) of the table notafiscal_items, WHERE id_items = 2 AND notafiscal.data_issued between ('2018-01-01' and '2018-12-31')
how would this select?
well straight, thanks, without the group by gave exactly what I needed, I was wrong in Ner Join
– Adriano