Skip to content
Advertisement

SQL change a table into another format

I have a table like this:

I want to use SQL to change the table into something like this:

What should I do?

Advertisement

Answer

Use conditional aggregation:

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