i am searching since a while for a performant MySQL Query solution. Hope someone could help me.
My Table looks like that:
values_table
___________________________________
| id | col | row | value |
-----------------------------------
| 1 | 1 | 1 | Test1 |
| 2 | 2 | 1 | Test2 |
| 3 | 1 | 2 | Test3 |
| 3 | 3 | 2 | Test4 |
| 3 | 4 | 3 | Test5 |
-----------------------------------
And i want to reach following result:
_________________________________
| col_1 | col_2 | col_3 | col_4 |
---------------------------------
| Test1 | Test2 | null | null |
| Test3 | null | Test4 | null |
| null | null | null | Test5 |
---------------------------------
I dont know how many columns it could be so it had to be dynamicly and not like static left joins.
Is something like this possible?
Would be so thankfuly if someone could help me!
Thank you!