C'est division relationnelle .
Utilisez GROUP BY
et COUNT
ou double NOT EXISTS
.
Un exemple de la première approche serait.
SELECT pt.Post_id, p.Post_Text
FROM Post_Tags pt
JOIN Posts p ON p.Post_id = pt.Post_id
WHERE pt.Tag_id IN (1,2,3)
GROUP BY pt.Post_id
HAVING COUNT(DISTINCT pt.Tag_id) = 3