Skip to content

Instantly share code, notes, and snippets.

@itaymesh
Last active April 9, 2018 10:40
Show Gist options
  • Save itaymesh/578cd812139bc0ce9d60589a085c5205 to your computer and use it in GitHub Desktop.
Save itaymesh/578cd812139bc0ce9d60589a085c5205 to your computer and use it in GitHub Desktop.
Find duplicate SKUs on Magento
select p.entity_id, p.sku, v.value as name
from catalog_product_entity p
left join catalog_product_entity_varchar v on p.entity_id = v.entity_id and v.attribute_id = 73 and v.store_id = 0
where p.sku in (select p.sku from catalog_product_entity p group by sku having count(*) > 1) ORDER BY `p`.`sku` ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment