 <pre><code>DELETE FROM table_x a WHERE rowid &lt; ANY ( SELECT rowid FROM table_x b WHERE a.someField = b.someField AND a.someOtherField = b.someOtherField ) WHERE ( a.someField, a.someOtherField ) IN ( SELECT c.someField, c.someOtherField FROM table_x c GROUP BY c.someField, c.someOtherField HAVING count(*) &gt; 1 ) </code></pre> <p>In above query the combination of someField and someOtherField must identify the duplicates distinctively. </p>