Last active
February 10, 2020 19:50
-
-
Save BrocksiNet/275c1c6dcd2d1fca88dfc927e1e0fba2 to your computer and use it in GitHub Desktop.
Magento2 - MySQL Select simples products not assigned to parents
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 * FROM `catalog_product_entity` | |
LEFT JOIN `catalog_product_entity_int` ON `catalog_product_entity`.`entity_id` = `catalog_product_entity_int`.`entity_id` | |
WHERE `catalog_product_entity`.`type_id` = 'simple' AND `catalog_product_entity_int`.`attribute_id` = (SELECT `attribute_id` FROM `eav_attribute` WHERE `attribute_code` = 'visibility') AND `catalog_product_entity_int`.`value` = 1 AND `catalog_product_entity`.`entity_id` NOT IN | |
( | |
SELECT `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