Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelve/3b51e8a89eb01c07aedf64415a3b0d52 to your computer and use it in GitHub Desktop.
Save michelve/3b51e8a89eb01c07aedf64415a3b0d52 to your computer and use it in GitHub Desktop.
Magento 2 - finding products without images - SQL
SELECT * FROM `catalog_product_entity` AS a
LEFT JOIN `catalog_product_entity_media_gallery` AS b ON a.entity_id = b.entity_id
WHERE b.value IS NULL
@michelve
Copy link
Author

Magento 2

SELECT * FROM catalog_product_entity AS a
LEFT JOIN catalog_product_entity_media_gallery_value_to_entity AS b ON a.entity_id = b.entity_id
WHERE b.value_id IS NULL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment