Prova questo sotto la logica-
SELECT ID FROM C
WHERE ID NOT IN
(
SELECT C.ID
FROM C
INNER JOIN F ON C.id = F.parent_id
INNER JOIN oui ON F.ID = Oui.rel_id
WHERE C.ID = CAST(oui.Product_Version AS INT)
-- by default your column "Product Version" should be INT in table oui
)
Il problema che hai menzionato nel commento qui sotto, puoi provare questa conversione opposta come di seguito-
SELECT ID FROM C
WHERE ID NOT IN
(
SELECT C.ID
FROM C
INNER JOIN F ON C.id = F.parent_id
INNER JOIN oui ON F.ID = Oui.rel_id
WHERE CAST(C.ID AS VARCHAR) = oui.Product_Version
)