select where field in one table is not another code example
Example: select from one table where not on the other
SELECT id FROM a.table
WHERE id NOT IN (SELECT b.id FROM b.id)
SELECT id FROM a.table
WHERE id NOT IN (SELECT b.id FROM b.id)