title: How do I select count(distinct someColumn) from someKeySpace.someTable... in cassandra?
body: <p>I need to get a unique clientid count from my cassandra database.  I know I can't accomplish this with the following piece of CQL code:</p>
  
  <pre><code>SELECT COUNT(DISTINCT clientid)
  FROM somekeyspace.sometable
  WHERE transdate &gt; '2017-05-06'
        AND transdate &lt; '2017-05-07'
        AND locationid = 1;
  </code></pre>
  
  <p>This question has been posted by others on stackoverflow, yet i can't seem to get a good answer.  Can I solve this with a UDF, and if so what would that look like?</p>
  
  <p>The issue i have with a UDF is that i don't know how to pass in an entire column of values as a parameter.</p>