Last active
June 22, 2016 11:51
-
-
Save the-nerdery-dot-info/4487a15b28ed78d6027f91d4815a44f5 to your computer and use it in GitHub Desktop.
useful magento 1.9.x sql statements
This file contains hidden or 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
#this selects configurable products that don't have any simple products associated with them | |
select entity_id from `catalog_product_entity` where 'type_id' = 'configurable' AND entity_id NOT IN (SELECT DISTINCT parent_id FROM catalog_product_super_link); | |
#this selects simple products not associated with a configurable one | |
select entity_id, sku from catalog_product_entity where type_id = 'simple' AND entity_id NOT IN (SELECT DISTINCT product_id FROM catalog_product_super_link); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment