Remove duplicate rows

This commit is contained in:
Erik Johnston 2015-04-10 18:47:03 +01:00
parent c5365dee56
commit 93937b2b31

View File

@ -0,0 +1,9 @@
DELETE FROM event_to_state_groups WHERE state_group not in (
SELECT MAX(state_group) FROM event_to_state_groups GROUP BY event_id
);
DELETE FROM event_to_state_groups WHERE rowid not in (
SELECT MIN(rowid) FROM event_to_state_groups GROUP BY event_id
);