0
good evening, I have the script below:
SELECT Month([doacao_total].[doacao_sdt_data]) AS MES,
Year([doacao_total].[doacao_sdt_data]) AS Ano,
Sum(doacao_total.doacao_mon_valor) AS [Valor_doacao],
Count(doacao_total.pessoa_lng_codigo) AS [Quantidade doações],
doacao_total.origem_doacao_lng_codigo,
doa_origem_doacao.origem_doacao_vch_descricao
FROM doacao_total
LEFT JOIN doa_origem_doacao
ON doacao_total.origem_doacao_lng_codigo =
doa_origem_doacao.origem_doacao_lng_codigo
WHERE Year([doacao_total].[doacao_sdt_data]) = 2019
GROUP BY Month([doacao_total].[doacao_sdt_data]),
Year([doacao_total].[doacao_sdt_data]),
doacao_total.origem_doacao_lng_codigo,
doa_origem_doacao.origem_doacao_vch_descricao
ORDER BY Year([doacao_total].[doacao_sdt_data]),
Month([doacao_total].[doacao_sdt_data]),
doacao_total.origem_doacao_lng_codigo
Running this script has resulted as in SUM_1 image, however, I need to add some source codes for the result to be as SUM_2 image.
the code I need to add:
1 + 2 + 7 + 9 - billet 8 - Boleto site 6 - Money 10 - Debit 11 - Recido 12 - Deposit 23 - Kharao
I got it with this code anyway. Thank you.
– c3s1