Sum in SQL code (DB2). Fazer soma em código SQL (DB2). (Brasil)

Concluído Postado há 3 anos Pago na entrega
Concluído Pago na entrega

Summation in SQL Code (DB2)

DB2 database (similar to SQL)

Need: Group QUANTIDADE by DATA.

See attached code.

To facilitate the code I created a CASE to be able to process the negative and positive quantities, according to the type of operation (IDOPERACAO). You may be able to redo this process and make it easier to add.

Goal:

IDPRODUTO = Exists once a day, only on days when there are NOTAS.

DATA = There is only 1 date for each IDPRODUTO.

QUANTIDADE = Sum of CASE or other solution. Remember that there are positive and negative operations.

I accept suggestions for improvements.

______________________________________________________________________________

In portuguese:

Banco de dados DB2 (parecido com SQL)

Necessidade: Agrupar a QUANTIDADE por DATA.

Ver código em anexo.

Para facilitar o código eu criei um CASE para poder processar as quantidades negativas e o positivas, de acordo com o tipo de operação (IDOPERACAO). Talvez seja possível refazer este processo e facilitar a soma.

Objetivo:

IDPRODUTO = Existe uma vez por dia, somente nos dias em que há NOTAS.

DATA = Existe somente 1 data para cada IDPRODUTO.

QUANTIDADE = É feita a soma do CASE ou outra solução. Lembrar de que existem operações positivas e negativas.

Eu aceito sugestão de melhorias.

SQL Microsoft SQL Server Programação de Banco de Dados MariaDB Administração de Bancos de Dados

ID do Projeto: #23316031

Sobre o projeto

3 propostas Projeto remoto Ativo em há 3 anos

Concedido a:

TEKSCENT

I have around 10 years of experience in DB2 development and maintenance and working as a tech lead in the [login to view URL] I have knowledge DB2 DBA too let me know if we can help you

$55 USD em 1 dia
(5 Comentários)
3.7

3 freelancers estão ofertando em média $45 nesse trabalho

nisharapath

Dear client How are you? I read your project detail carefully. As a SQL developer, I'm sure it is very suitable for me If you contact me, I can help you well. I'm ready to work for you. Thank you

$13 USD em 1 dia
(4 Comentários)
3.6
Eminencehub

hello sir, I can understand your requirements and i am glad to say you that we have professional designers and developers, who can do your project as your requirements. Please message for further discussion. Regards E Mais

$66 USD in 2 dias
(0 Comentários)
0.0