Created
February 26, 2019 14:43
-
-
Save vishy93/69c1ae3737beadfa3201b538aa4e8323 to your computer and use it in GitHub Desktop.
SQL statement to get a list of enabled products that are not in any categories
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 cpe.entity_id, | |
cpe.sku | |
FROM catalog_product_entity AS cpe | |
LEFT JOIN catalog_category_product AS ccp | |
ON cpe.entity_id = ccp.product_id | |
LEFT JOIN catalog_product_entity_int AS cpi | |
ON cpe.entity_id = cpi.entity_id | |
WHERE category_id IS NULL | |
AND attribute_id = (SELECT attribute_id | |
FROM `eav_attribute` | |
WHERE `attribute_id` LIKE '80') | |
AND cpi.value = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment