This works without a problem:
PIVOT
(
SUM(PremAmount)
FOR trans IN ([1],[8],[9])
) AS pvt
Is there a way to have a different rule for different trans codes?
For Example:
PIVOT
(
SUM(PremAmount)
FOR trans IN ([1],[8],[9])
SUM(LossAmount)
FOR trans IN ([2],[3],[6],[7])
) AS pvt
Thank you in advance for any advice!