Deleting Duplicate Records using MySQL

I recently had a table which ended up with some duplicate records being imported. A simple way to achieve this is to use a subquery as follows:

If you want to keep the row with the lowest id value:

If you want the id value that is the highest:

Original Article: Stack Overflow