DELETE FROM {테이블명}
WHERE {제거 조건}
DELETE FROM users U
USING users_withdl W
WHERE U.user_idx = W.user_idx
AND U.dltd_at IS NOT NULL
AND W.dltd_at IS NULL
AND W.withdl_at + INTERVAL '5 years' < now();
DELETE FROM {테이블명} A
USING {테이블명} B -- 동일 테이블
WHERE A.{컬럼1} = B.{컬럼1} -- 일치(중복) 조건
AND A.{컬럼2} > B.{컬럼2} -- 제거 조건