title: How to exclude records with a Combined AND Condition. Individually the records can exist
body: <p>How to put WHERE condition in Amazon Redshift  in which the Scenario is as below:</p>
  
  <pre><code>SELECT A.a,B.a 
  FROM Table A
     LEFT JOIN B b
     ON A.x=B.x
  WHERE NOT (A.y='ABC' AND B.y='DEF')
  </code></pre>
  
  <p>What i want to do is to fetch all the results except the ones where the combined condition <code>(A.y="ABC" AND B.y="DEF")</code> is not there. </p>
  
  <p>there can be records with <code>A.y="ABC" and B.y="DEF"</code> individually but when the condition is met <code>(A.y="ABC" AND B.y="DEF")</code> then those records should not be fetched</p>