title: Cross join in Excel or SQL
body: <p>I am using Gephi to create a network graph, here is a small subset of the data that I have:</p>
  
  <pre><code>ID  Label
  1   Sleep quality   
  2   Stress  
  3   Healthy Eating  
  4   Tremor  
  5   Balance 
  6   Drooling    
  7   Exercise    
  8   Mood    
  9   Speech  
  10  Parkinson's On-Off
  </code></pre>
  
  <p>So I want my graph to have these 10 nodes. </p>
  
  <p>Then for the edges, I have:</p>
  
  <pre><code>Source Target   User
  1       5       5346
  5       4       5346
  4       7       5346
  7       6       5346
  6       9       5346
  9       3       5346
  3       2       5346
  2       8       5346
  8       10      5346
  </code></pre>
  
  <p>The "User" column is something I have added to explain the problem I am having. I am using a big database (in SQL) to obtain this data. On a mobile phone app, users select 10 of the different choices available (as listed in the nodes). In SQL I can query the data easily so that I can obtain the 10 choices of each of the users. </p>
  
  <p>It is easy to create a graph with the edges with the information in the edges table but I would also like to connect each edge to all other edges, this is important for me. So for example, 1 connects to all those in "target". Then 5 connects to all those in "target" and so until all nodes are connected to each other for each user. </p>
  
  <p>I can do this manually but the original data set has 2000+ users and this will take a long time. I know that there is a way of using cross join, possibly in Excel or in SQL... but I'm unsure how to do this..</p>
  
  <p>Thanks!</p>