Remove Duplicate Rows From Sql Table
DELETE amazon_order_detailsnirav
FROM amazon_order_detailsnirav
LEFT OUTER JOIN (
SELECT MAX(id) as id, `sku`, `ASIN`, `amazon_order_id`, `purchase_date`
FROM amazon_order_detailsnirav
GROUP BY `sku`, `ASIN`, `amazon_order_id`,`purchase_date`
) as KeepRows ON
amazon_order_detailsnirav .id= KeepRows.id
WHERE
KeepRows.id IS NULL