title: Comparing values in two columns and returning values on conditional bases using sql hive
body: <p>I have two columns, I want to get an output based on a comparative basis of both. My data is somewhat like:</p>
  
  <pre><code>Customer Id   status
  100           A
  100           B
  101           B
  102           A
  103           A
  103           B
  </code></pre>
  
  <p>So a customer can have a status A or B or both, I have to segrerate them on customer id basis for a status. If status A and B then return happy, if only A, return Avg and if only B return Sad.</p>