title: How to remove duplicate/inverted rows from INNER JOIN
body: <p>I am using SQL to pull from a table, I am also using an INNER JOIN to select to rows with linking values/columns, and appending them into one big row.</p>
  <p>Table below:</p>
  <pre><code>   | name    |   value    |   num |
     | James   |   HEX124   |   1   |
     | James   |   JEU836   |   4   |
  </code></pre>
  <p>I am now joining these two rows, into one row using this SQL:</p>
  <pre><code>SELECT  a.name, a.value, a.num, b.name, b.value, b.num
  FROM MY_TABLE a
  INNER JOIN MY_TABLE b ON a.name = b.name //Inner joining where the name is the same
  WHERE a.value &lt;&gt; b.value // where the values are NO the same
  </code></pre>
  <p>Result:</p>
  <pre><code>   | a.name  |   a.value  | a.num | b.name  |   b.value  | b.num |
     | James   |   HEX124   |   1   |  James  |   JEU836   |   4   |
     | James   |   JEU836   |   4   |  James  |   HEX124   |   1   |
  </code></pre>
  <p>As you can see in the result, this is working, but it's returning every possible result, I want to only return one of these rows, as its duplicated/inverted them almost.</p>
  <p>Maybe by returning only the first row WHERE a.name is a duplicate?</p>
  <p>Desired Result:</p>
  <pre><code>   | a.name  |   a.value  | a.num | b.name  |   b.value  | b.num |
     | James   |   HEX124   |   1   |  James  |   JEU836   |   4   |
  </code></pre>
  <p>Thank you</p>