Assuming I have the following data in a MySQL:
**bond** | **node** | **edges**
foo | 1 | 2,3
hak | 2 | 1
wat | 3 | 1,2
I wish to return results to create data suitable for visualisation in Cytoscape. It requires that each node have a line devoted to each edge. The output would look like:
**bond** | **node** | **edges**
foo | 1 | 2
foo | 1 | 3
hak | 2 | 1
wat | 3 | 1
wat | 3 | 2
I think the PIVOT operator might work somehow, but I have had no luck.
Assuming you have an edge master table where in all possible values for edges are stored.
If my assumption is wrong, my answer will not hold good
Sql Fiddle