Skip to content
Advertisement

Query to generate map table to matrix table

I have 1 map table

I need to generate it in a matrix table like

It will help if someone could suggest how SQL Server can generate this output?

Advertisement

Answer

Use conditional aggregation:

This works because 'Yes' > 'No'.

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