1
Good morning, I’m creating an ABC curve report but I’m beginner and I’m still having some difficulties.
I have a table called ITEMS. With fields: COD_ITEM, Quantityevenda, Valorunitario, Subtotal, Descricao
With an SQL query I managed to bring the total sales value:
SELECT SUM(SUBTOTAL) AS SUBTOTAL FROM ITENS
ORDER BY SUBTOTAL
And with another query that I did not understand why did not work, brings the fields I asked but they are not "added" getting several records of the same item.
SELECT COD_ITEM, QuantidadeVenda, Descricao, ValorUnitario,
Subtotal FROM ITENS
GROUP BY COD_ITEM, QuantidadeVenda, Descricao, ValorUnitario,
Subtotal
What you really need to bring is a select that shows how many % of each item represents compared to total sales
Inform BD because some have native tools that facilitate this type of query.
– Motta
So this is Ibexpert
– WSS
The Firebird, this is the to manage and
– WSS
http://www.devmedia.com.br/forum/tem-comoros- fazer-no-firebird/59910 helped ?
– Motta
@WSS: What is the Firebird version?
– José Diz