I have grouped values using GROUP_CONCAT() and now, I would like to unnest them into separate rows. I cannot use UNNEST() in MySQL as far as I am aware. How can I go about solving this?
The current version of the table:
| Id | Grouped_column |
|---|---|
| 1 | A, B, C |
| 2 | A, D |
A desired version of the table:
| Id | Grouped_column | Unnested_column |
|---|---|---|
| 1 | A, B, C | A |
| 1 | A, B, C | B |
| 1 | A, B, C | C |
| 2 | A, D | A |
| 2 | A, D | D |