title: SQL "IN" statement for multiple columns
body: <p>I would like to filter Name,X combinations for which is never X=Y
  Let's assume the following table:</p>
  
  <pre><code>*Name*     *X*      *Y*
     A        2        1
     A        2        2   &lt;--- fulfills requirement for Name=A, X=2
     A       10        1
     A       10        2
     B        3        1
     B        3        3   &lt;--- fulfills requirement for Name=B, X=3
     B        1        1   &lt;--- fulfills requirement for Name=B, X=1
     B        1        3
  </code></pre>
  
  <p>So I would like to return the combination Name=A, X=10 for which X=Y is never true.
  This was my approach (which is syntactically incorrect)</p>
  
  <pre><code>SELECT * 
  FROM TABLE 
  WHERE NAME
       , X NOT IN (SELECT DISTINCT NAME
                         , X 
                   FROM TABLE 
                   WHERE X=Y)
  </code></pre>
  
  <p>My problem is the where statement which cannot handle multiple columns. Does anyone know how to do this?</p>