I have a table with three columns eg:
EID # Node1 # Node 2
----------------------------
50 # 23 # 25
34 # 6 # 11
78 # 25 # 9
45 # 2 # 45
39 # 12 # 9
40 # 6 # 2
EID 50 78 39 Belong together because they share nodes (Connected via nodes 25 9). EID 34 40 Belong together because they share nodes (Connected via node 6). EID 45 is alone because it does not share any nodes wit any other EID. The new table should look like this:
CF # EIDs #
---------------------
1 # 50 78 39 #
2 # 34 40 #
3 # 45 #
My general question is: Is there a way to do this in SQLite, or should I do this kind of sorting "outside" of the DB using some other program routine?