SELECT * FROM tabell2 WHERE langid=Y AND parentid NOT IN (SELECT parentId FROM tabell2 WHERE langid=X)