Please see the data below:

I am looking for a query that generates the following output:

I am experimenting with 'PIVOT', but have not yet achieved the desired outcome.
This should work:
SELECT ReviewType, DER, LEI, NOR, [NOT], LIN
FROM Src
PIVOT (SUM(Total) FOR OwningAgency IN (DER, LEI, NOR, [NOT], LIN)) P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With