I take no responsibility¬†for this code. If you need it for Magento EE, please see this link. I highly recommend you take a backup of your database first. DO NOT execute these SQL statements on production database directly. Alternatively, use Magento Database Repair Tool. — — Magento CE database clean-up — — This will clean – Read More-