I\'m having some trouble with a tricky SQL-query.
In my MySQL database there is the tables topics, tags and tags_topics to join them. I want to fetch topics that share
SELECT topic_id FROM tags_topics WHERE tag_id IN (1,2,3) GROUP BY topic_id HAVING COUNT(*) > 2 /* or use COUNT(*) = 3 if you know that there cannot be duplicates in the junction table */