How to add items from a column in SQL

Asked

Viewed 33 times

-1

I’d like to know how to add up those repeated items totaling their amount, I’m a beginner in SQL

select Cardapio.Indicadorsetor, Service from Cardapio,

inserir a descrição da imagem aqui

1 answer

1

I believe that this SQL sums the quantities by grouping the items:

select Cardapio.IndicadorSetor, Cardapio.NomeItem, SUM(AtendimentoItem.Quantidade)
from Cardapio,AtendimentoItem 
group by Cardapio.IndicadorSetor, Cardapio.NomeItem
  • 1

    It worked out, thanks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.