La consulta tal como la pediste es:
SELECT parent.item1, parent.item2, parent.index
FROM parent
INNER JOIN
child
ON child.index = parent.index
GROUP BY
parent.item1, parent.item2, parent.index
HAVING SUM(CASE WHEN child.value IN (1111111, 2222222) THEN 1 ELSE 0 END) = 2
AND COUNT(*) <= 2
Si solo quiere asegurarse de que los niños coincidan con todos los valores en IN
list y ninguno que no esté en la lista, use esto (en SQL Server
)
SELECT *
FROM parent p
WHERE NOT EXISTS
(
SELECT NULL
FROM (
SELECT value
FROM child c
WHERE c.index = p.index
) c
FULL JOIN
(
SELECT 11111111 AS value
UNION ALL
SELECT 22222222
) q
ON c.value = q.value
WHERE c.value IS NULL OR q.value IS NULL
)