title: distinct condition in case statement
body: <p>I have a SQL that returns a cnt1 and cnt2 for each Event_ID, while testing a condition for column "POSA" </p>
  
  <p>this returns the following as desired:</p>
  
  <p>Event_ID | CNT1 | CNT2</p>
  
  <p>I would like to add another condition to each CASE statement that tests if another column "S" in the same table is distinct.  Below is the code snippet:</p>
  
  <pre><code>SELECT Event_ID, 
   sum  
   (CASE WHEN POSA IN ('SX', 'DX')  THEN 1 
      ELSE 0 
   END) 
   AS cnt1,
  sum 
  (CASE  
      WHEN POSA IN ('SP', 'DP')  THEN 1 
      ELSE 0 
   END) AS cnt2
  
  
  FROM Station_Processed_Info GROUP BY EVENT_ID;
  </code></pre>