>select individual_ref from contact where individual_ref in (190999,191000,191001,191002) >>
>select individual_ref from individual where family_ref = 190997 >>
>select i.individual_ref from individual i where not EXISTS (select c.individual_ref from contact c ) >>
select i.individual_ref from individual i where not EXISTS (select 1 from contact c where c.individual_ref = i.Individual_Ref )The way you wrote your query just checks if the Contact table has at least one row. If it's true, it will return 0 records.