📅  最后修改于: 2022-03-11 15:00:55.385000             🧑  作者: Mango
SELECT inactive.id
FROM inactive
WHERE NOT EXISTS (select null from renamed where renamed.id = inactive.id)
AND NOT EXISTS (select null from returned where returned.id = inactive.id)