I have the following query :
SELECT
s1.suprimento,
e1.numeroserie,
s1.capacidade,
e1.numeronotafiscal,
e1.valorunitario,
e1.datanotafiscal
FROM
public.estoque e1,
public.suprimento s1,
public.fornecedor
WHERE
e1.datanotafiscal is not null and
s1.codigo = e1.codigosuprimento and
e1.codigofornecedor = public.fornecedor.codigo and
e1.numeronotafiscal = '19255'
ORDER BY
e1.datanotafiscal desc,s1.suprimento
Where do I get the following return:
How could I make a count to return the quantity of each supply of that return, and sum the unit value of each item?