I have the following table:
id | name
1 | Group1
2 | Group2
.. | ...
I want to join it with another table this way:
id | group_1 | group_2 | ..
1 | 10 | 8 | ..
2 | 12 | 6 | ..
Hence Group1
with id 1
will be joined with the 2nd table group_1
.
To group the columns and avoid:
id | group_id | value
1 | 1 | 10
2 | 1 | 12
3 | 2 | 8
4 | 2 | 6
.. | .. | ..
Is it possible or is there an alternative way to achive the same result?