I have task to compare the counts and see if it's > 0
snowflake sql below
select 'abc'
from tableA
where
(SELECT count(T1.value) as val
from tableA,
lateral flatten(input=>split(abc, ',')) T1
INNER JOIN (select count(T2.value) as val from
lateral flatten(input=>split('1,2', ','))) as T2 on T1.val = T2.val) > 0
here is the error msg
SQL compilation error: error line 7 at position 29 invalid identifier 'T2.VALUE'
Sql server comparison that works.
(select Count(T1.value) as [Count] from STRING_SPLIT(abc,',') AS T1
INNER JOIN STRING_SPLIT('9,10', ',') AS T2 on T1.value = T2.value))>0