title: SQL Query to find pairs of EMPLOYEES who have the same DEPTNO
body: <p>I have a query finding the pairs of <code>ENAME</code>'s with the same <code>DEPTNO</code>:</p>
  
  <pre><code>SELECT DISTINCT e.ENAME as W1, m.ENAME AS W2
  FROM EMP e 
  INNER JOIN emp m ON e.DEPTNO = m.DEPTNO AND e.ENAME != m.ENAME --AND m.ENAME != e.ENAME
  ORDER BY e.ENAME;
  </code></pre>
  
  <p>the pairs should not be the same...
  how to get rid of pairs like (to present only one of them):</p>
  
  <pre><code>BLAKE &lt;==&gt; WORD
  WORD  &lt;==&gt; BLAKE
  </code></pre>