Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Remove duplicated records
Browse files Browse the repository at this point in the history
We had more than a half duplicated records.
  • Loading branch information
JingMatrix committed Nov 19, 2022
1 parent 71a94c7 commit a154465
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
archive.rdb
alibrary.pgdb
alibrary.sql
7 changes: 7 additions & 0 deletions remove_dup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DELETE FROM record d
WHERE EXISTS (
SELECT FROM record
WHERE name = d.name
AND size = d.size
AND ctid < d.ctid
);

0 comments on commit a154465

Please sign in to comment.