diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-12-11 14:12:11 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-12-11 14:12:11 +0100 |
commit | 44e46e5c71af611784143a2ebf1a36042c3302ac (patch) | |
tree | d62421b98ae93990763a747cf67d9433c6e0cfb1 /database.cleanup | |
parent | ae5ee7a18295b0f50ce2a363d01eed8a45fd9bb5 (diff) |
[DB] remove badges variants : script corrections + renaming
Diffstat (limited to 'database.cleanup')
-rw-r--r-- | database.cleanup | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/database.cleanup b/database.cleanup deleted file mode 100644 index 1d3d918..0000000 --- a/database.cleanup +++ /dev/null @@ -1,17 +0,0 @@ - -USE lastfm - - -/** - * Deletes all entries in badges - * for each unique username + type - * where more than one style or color exists - */ - -DROP TABLE IF EXISTS tmp ; -CREATE TEMPORARY TABLE tmp (SELECT username, type, COUNT(username) AS count FROM badges GROUP BY username, type ) ; -SELECT * FROM tmp WHERE count > 1 ; -DELETE badges FROM badges, tmp WHERE badges.username = tmp.username AND tmp.count > 1 ; -DROP TABLE tmp ; - - |