Skip to content
Advertisement

SQL Pivot multiple column [closed]

I have table like this:-

enter image description here

and want output like this:-

enter image description here

Any help?

Advertisement

Answer

Below is a more standard/general approach (conditional aggregation) for this problem that would work across multiple Databases (including SQL Server).

Note : If you are not using T-SQL (SQL Server), Pivot function won’t work as it is specific to SQL Server

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