Skip to content
Advertisement

SQL PIVOT-WINDOW FUNCTIONS

With the sql query I get table 1

table 1

Trying to pivot using window functions below on Server 2012 fails

My desired output

Advertisement

Answer

Use conditional aggregation

Also, you can try with pivot –

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