Created
April 7, 2017 09:07
-
-
Save neilbradley/1c5807766b23631342f4f8924a930c72 to your computer and use it in GitHub Desktop.
Find Duplicate SKUs in Magento
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DISTINCT(`sku`) as `sku`, | |
COUNT(`sku`) as `skuCount`, | |
entity_id | |
FROM | |
catalog_product_entity | |
GROUP BY | |
`sku` | |
HAVING | |
`skuCount` > 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ERROR 1055 (42000): Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dev_quartinhos.catalog_product_entity.entity_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by