Relative Content

Tag Archive for sqlregexamazon-redshiftpcre

count unique elements of a string with regex and delimiter “,”

I’m trying to count the number of unique elements in a list (delimiter “,”) in Redshift. I’m currently using REGEXP_COUNT with PCRE patterns for regex. Testing with the below list (“list,test,test,count”), I’d like to get 3 (list, test, count) but it’s resulting in 0.