Posts by viniciusdevJava • 61 points
4 posts
-
0
votes2
answers1174
viewsA: Sum values of several lines under condition
RESOLVED: sum(sum(car.car_vl_cartao) filter(where adm.adm_fl_tipo = 'D')) over(order by adm.adm_ds_administradora) as accum_debito, sum(sum(car.car_vl_cartao) filter(where adm.adm_fl_tipo = 'C'))…
-
3
votes2
answers1174
viewsQ: Sum values of several lines under condition
Good afternoon gentlemen, I have a query that returns to me some precise fields of their sum, only that in a condition select adm.adm_ds_administradora as descricao, sum(car.car_vl_cartao) as valor,…
-
0
votes2
answers72
viewsA: Why is OR not good in a LEFT JOIN?
I was able to solve a little bit, Ester did it this way: FROM LEFT JOIN administracao.cidade cid_cec ON cid_cec.cid_cd_cidade = cec.cec_cd_cidade LEFT JOIN administracao.cidade cid_cli ON…
-
3
votes2
answers72
viewsQ: Why is OR not good in a LEFT JOIN?
I’m creating a query and my pull request returned because the Code Star considered that the OR is not good for relationship tables. Example: FROM LEFT JOIN administracao.cidade cid ON…