I have a dataset with many text comments from a social media site. I want to find all instances where at least two country names are featured in the text. What I have right now looks like:
SELECT * FROM comments WHERE body ~* '(Canada|United States|Mexico)'
This lets me find instances of any mention of these three countries. But what if I want to find instances where at least two of these names are present.