Consider below
SELECT * FROM table1 t1
LEFT JOIN table2 t2 ON t1.id = t2.id
WHERE
t1.A NOT IN ('111111','222222','33333')
AND
t2.B NOT IN ('111111','222222','33333')
Is there another way to use the same filter parameters for two different fields?
Something like that
SELECT * FROM table1 t1
LEFT JOIN table2 t2 ON t1.id = t2.id
WHERE (t1.A and t2.B) NOT IN ('111111','222222','33333')
Seems pretty simple, but I couldn't find anything in the docs.