title: Distinct Values with criteria
body: <p>I have a table in the format given below:</p>
  
  <pre><code>Account Programme View
  A   1
  B   0
  A   1
  A   1
  C   1
  C   1
  D   0
  E   1
  D   0
  E   1
  G   0
  B   0
  </code></pre>
  
  <p>How do I get the unique accounts with programme view 1. Here the answer is <code>3 (A, C &amp; E)</code>. I used <code>Sum(if(frequency....)</code> but getting stuck in defining the criteria.</p>