Postgresql – Simplifying WHERE (NOT) IN (…) AND WHERE (NOT) IN (…)
In this dbfiddle demo I have a DELETE FROM... WHERE at the end like so: ...... DELETE FROM data_table WHERE (location, param_id, ref_time, fcst_time) NOT IN (SELECT location, param_id, ref_time, fcst_time FROM sel1) AND (location, param_id, ref_time, fcst_time) NOT IN…