title: Exclude records with certain values in Qubole
body: <p>Using Qubole</p>
  <p>I have</p>
  <p>Table A (columns in json parsed...)</p>
  <pre><code>ID  Recommendation    Decision
  1     GOOD            GOOD
  2     BAD             BAD
  2     GOOD            BAD
  3     GOOD            BAD
  4     BAD             GOOD
  4     GOOD            BAD
  </code></pre>
  <p>I need to Select only IDs which have Recommendation GOOD but Decision BAD. Therefore output should be 3.</p>
  <p>I tried :</p>
  <pre><code>SELECT a.ID  
  FROM (
  select json_parsed['ID'] as ID
  ,json_parsed[&quot;Decision&quot;] as Decision
  ,json_parsed[&quot;Recommendation&quot;] as Recommendation
  from  A  
  where create_date &gt;= '2020-11-18') a
  Left JOin
  (select json_parsed['ID'] as ID
  ,json_parsed[&quot;Decision&quot;] as Decision
  ,json_parsed[&quot;Recommendation&quot;] as Recommendation
  from  A
  where create_date &gt;= '2020-11-18') as b on a.ID = b.ID and b.Recommendation = &quot;GOOD&quot;
  Where
  b.Recommendation is NULL
  </code></pre>