I'm just curious about filtering my query with a where statement in a table with array column
So for example, I have a column of username and usertype, then each username might have more than one type
So when I use
select username, collect_set(usertype) as type from table group by username
Then I will have something like: user1,[1,2,3], user2,[3,4,5] and so on. The problem is when I want to filter the result using "where usertype = [3,4,5]". I am not sure how to construct an array to do the filtering and right now I have been using "where usertype[0] = 3 and usertype[1] = 4 " and so on. Anyone has any advise or idea on this matter?
Thanks