diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2011-07-13 12:48:05 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2011-07-13 12:48:05 +0200 |
commit | 370d4caf1421aa438c2288f6366fbba05877675d (patch) | |
tree | 13061ddf79657ab266f5c1f297ce02b6772affda /DataBase | |
parent | c6dc310e54aef41f8de6307f7c1aae69def5cbe3 (diff) |
[Duplicates] only remove 1-hit duplicates.
Diffstat (limited to 'DataBase')
-rw-r--r-- | DataBase/cleanup.mysql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/DataBase/cleanup.mysql b/DataBase/cleanup.mysql index aa51af5..0fb94e9 100644 --- a/DataBase/cleanup.mysql +++ b/DataBase/cleanup.mysql @@ -9,6 +9,7 @@ CREATE TEMPORARY TABLE duplicates (SELECT username, type, COUNT(username) AS cou DELETE badges.* FROM badges, duplicates WHERE badges.username = duplicates.username + AND badges.hits = 1 AND ( (badges.type = duplicates.type AND duplicates.count > 1) OR ( (badges.type LIKE concat(duplicates.type,"%") OR duplicates.type LIKE concat(badges.type,"%")) AND badges.type != duplicates.type ) |