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