Zkuste toto:
SELECT *
FROM tablename
WHERE keywordId IN (1, 12)
GROUP BY articleId
HAVING COUNT(*) = 2;
Podívejte se na SQL FIDDLE DEMO
Zkuste toto:
SELECT *
FROM tablename
WHERE keywordId IN (1, 12)
GROUP BY articleId
HAVING COUNT(*) = 2;
Podívejte se na SQL FIDDLE DEMO