me@egidiocaprino.it writes:
> This query returns no record
> select *
> from merge.organization
> where school_id not in (select school_id from merge.account)
> or school_id not in (select school_id from merge.sd3_hierarchy)
This usually means that you've got NULLs in the school_id column.
NOT IN never returns true if there are any nulls in the sub-select result.
This is per SQL standard.
regards, tom lane