title: Counting based on distinct column value
body: <p>Suppose I have the following table in Oracle:</p>
  
  <pre><code>Member Code Cond
  1      A    Good
  1      B    Bad
  2      B    Bad
  3      A    Good
  3      B    Good
  3      B    Bad
  </code></pre>
  
  <p>How do I get a result such that:</p>
  
  <pre><code>Code Condition Code_Count Uniq_Member_Count
  A    Good        2          2
  B    Bad         3          3
  B    Good        1          0 (Reason why we're setting this 0 because for code B we already counted the unique member on the previous line)
  </code></pre>
  
  <p>I am just trying to calculate the total uniq member count regardless of condition in one query. Hope my question made sense. Thanks!</p>