die Lösung liegt in der Aggregat-Funktion:
Code: Alles auswählen
Select SUM(...), SUM(...), CASEWHEN(..., SUM(...),SUM(...)) GROUP BY ...Code: Alles auswählen
Select SUM(...), SUM(...), SUM ( CASEWHEN(..., ..., ...)) GROUP BY ...War bisher anders.
Gruß
HaPott