How can I pivot this table
| ID | attribute_name | attribute_value |
|---|---|---|
| 1 | Name | John |
| 1 | Country | UK |
| 1 | City | London |
into structure?
| ID | Name | Country | City |
|---|---|---|---|
| 1 | John | UK | London |
According to the documentation pivot requires a aggregate function
SELECT ...
FROM ...
PIVOT ( <aggregate_function> ( <pivot_column> )
FOR <value_column> IN ( <pivot_value_1> [ , <pivot_value_2> ... ] ) )
How can I apply this to string values?
