0
How do I add the result of several selects, for example, I have 2 selects that each of them brings a value field, ie with the sum of something...
Select 1:
SELECT SUM(ms.valor) as valor
FROM risco1.margem_solicitada ms
WHERE ms.codigo = 5410477
AND ms.data= '26/05/2020'
Select 2:
SELECT SUM(mbmf.valor - mbmf.valor_sacado) as valor
FROM risco1.margem_solicitada2 mbmf
WHERE mbmf.codigo = 5410477
AND mbmf.data= '26/05/2020'
How are we the result of these 2 selects ? I have seen that just putting a '+' between them does not work...
Thanks, it worked out
– Stand Alone