title: Select Distinct pair of column values
body: <p>I have a table like this</p>
  
  <pre><code>A1 | A2
  a  | b
  c  | d
  b  | a
  a  | b
  </code></pre>
  
  <p>And I want to select distinct pairs :</p>
  
  <pre><code>A1 | A2
  a  | b
  c  | d
  </code></pre>
  
  <p>I tried :</p>
  
  <pre><code>select a, b from (
  select a, b , a|b as ab, b|a as ba from T
  )t where ab!=ba group by a, b
  </code></pre>
  
  <p>Anyone have a better idea about how I can do this ?
  Thanks</p>