title: How to use and "in" clause in "having" in HIVE?
body: <p>I have my data in sometable like this:</p>
  
  <pre><code>col1    col2    col3   
  A       B       3
  A       B       1
  A       B       2
  C       B       1
  </code></pre>
  
  <p>And I want to get all of the unique groups of <code>col1</code> and <code>col2</code> that contain certain rows of col3.  Like, all groups of col1 and col2 that contain a "2".</p>
  
  <p>I wanted to do something like this:</p>
  
  <pre><code>select col1, col2 from sometable 
  group by col1, col2
  having col3=1 and col3=2
  </code></pre>
  
  <p>But I want it to only return groups that have an instance of both 1 and 2 in col3.  so, the result after the query should return this:</p>
  
  <pre><code>   col1    col2
     A       B
  </code></pre>
  
  <p>How do I express this in HIVE?  THANK YOU.</p>