I'm trying to add the value of id 1 and the value2 of id 2 which in this case would equal 220, how do I do this query ?
ID VALOR VALOR2
---------- ---------- ----------
1 110 100
2 100 110
This was the select I was trying to do, but it did not work
select valor+valor2 from teste3 where valor = (select valor from teste3 where id = 1 and valor2 = (select valor2 from teste3 where id = 2))