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
PIVOT (SUM(Total) FOR OwningAgency IN (DER, LEI, NOR, [NOT], LIN)) P