title: Count distinct multiple columns in redshift
body: <p>I am trying to count rows which have a distinct combination of 2 columns in Amazon redshift. The query I am using is - </p>
  
  <pre><code>select count(distinct col1, col2)
  from schemaname.tablename
  where some filters
  </code></pre>
  
  <p>It is throwing me this error - </p>
  
  <blockquote>
    <p>Amazon Invalid operation: function count(character varying, bigint) does not exist`</p>
  </blockquote>
  
  <p>I tried casting <code>bigint</code> to <code>char</code> but it didn't work.</p>