title: Show distinct tuples regardless of column order
body: <p>Say I have following results</p>
  
  <pre><code>----------------------
  |   col1  |   col2   |
  ----------------------
  |    a    |    b     |
  |    b    |    a     |
  |    c    |    d     |
  |    e    |    f     |
  ----------------------
  </code></pre>
  
  <p>I would like to get distinct tuple regardless of column order. In other words, (a, b) and (b, a) are considered "same" because changing the order make one same as the other (a, b) == (a, b). So, after executing query should be:</p>
  
  <pre><code>----------------------
  |   col1  |   col2   |
  ----------------------
  |    a    |    b     | // or (b, a)
  |    c    |    d     |
  |    e    |    f     |
  ----------------------
  </code></pre>
  
  <p>Can any query expert help me on this? I've been stuck for few hours and wasn't able to solve this. </p>
  
  <p>Below is my detailed scenario I'm working on.</p>
  
  <p>I have the following relations:</p>
  
  <pre><code>Ships(name, country) // ("Lincoln", "USA") = "Ship Lincoln belongs to USA"
  Battles(ship, battleName) // ("Lincoln", "WW2") = "Ship Lincoln fought in WW2"
  </code></pre>
  
  <p>And I need to find: <strong>List all pairs of countries that fought each other in battles</strong></p>
  
  <p>I was able to find all pairs by executing below query:</p>
  
  <pre class="lang-sql prettyprint-override"><code> SELECT DISTINCT c1, c2
   FROM
   (SELECT DISTINCT s1.country as c1, battleName as b1
    FROM Ships as s1, Battles
    WHERE s1.name = ship) as t1
   JOIN
   (SELECT DISTINCT s2.country as c2, battleName as b2
    FROM Ships as s2, Battles
    WHERE s2.name = ship) as t2
   ON (b1 = b2)
   WHERE c1 &lt;&gt; c2
  </code></pre>
  
  <p>And the result of executing above query is:</p>
  
  <pre><code>---------------------------------
  |       c1      |       c2      |
  ---------------------------------
  |       USA     |     Japan     |   // Row_1
  |      Japan    |      USA      |   // Row_2
  |     Germany   | Great Britain |   // Row_3
  | Great Britain |    Germany    |   // Row_4
  ---------------------------------
  </code></pre>
  
  <p>But Row_1 and Row_2 are same as well as Row_3 and Row_4. </p>
  
  <p>What I need is to print either one of Row_1 or Row_2 and either Row_3 or Row_4.</p>
  
  <p>Thank you</p>