從 postgres 表中刪除重複記錄
DELETE
FROM <SCHEMA_NAME>.<Table_NAME>
WHERE
ctid NOT IN
(
SELECT
MAX(ctid)
FROM
<SCHEMA_NAME>.<TABLE_NAME>
GROUP BY
<SCHEMA_NAME>.<TABLE_NAME>.*
)
;