Skip to content
Advertisement

Different conditions When Sum in same query

I have 6 querys that do the same but have differents conditions in WHERE statements. Is it possible to get all the criterias for each query and get 6 differents results? I think that I can use UNION ALL but the queries are so big. Below are the queries:

query 1(Dv1)

query 2(Dv2)

query 3(Dv3)

. . . query 6(Dv6)

Output expected: enter image description here

Advertisement

Answer

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement