title: combinations in sql without repetitions
body: <p>Use case:</p>
  
  <p>Table_name : Teams. it has 1 column "Country)</p>
  
  <pre><code>Country
  India
  lanka
  aus
  </code></pre>
  
  <p>Now I need to create a new table with 2 columns "Team 1" and Team 2" which generates the matches. </p>
  
  <p>Example:</p>
  
  <pre><code>Team1     Team2        
  Ind       Lanka
  Ind       Aus
  </code></pre>
  
  <p>Ignoring the create table and insert table queries, here is my select query to accomplish this:</p>
  
  <pre><code>SELECT distinct
  s1.Country as sk, 
  s2.Country as sk2
  from Teams s1 cross join Teams s2
  where sk &lt;&gt; sk2
  </code></pre>
  
  <p>I am able to get a partial output, but my problem is the above query contains op like below:</p>
  
  <pre><code>Team1     Team2
  India      Aus
  Aus        India
  </code></pre>
  
  <p>but in the scenario these are two same matches. Any suggestions on how to correct this mistake is appreciated.</p>