Get Products which don’t have Images in Magento – Mysql Query


SELECT e.sku, cpev.value as productName, COUNT(m.value) as cnt
FROM catalog_product_entity e
inner join
catalog_product_entity_varchar cpev on e.entity_id = cpev.entity_id and cpev.attribute_id=73
LEFT JOIN catalog_product_entity_media_gallery_value_to_entity r
ON e.entity_id = r.entity_id
LEFT JOIN catalog_product_entity_media_gallery m
ON r.value_id = m.value_id

GROUP BY
e.entity_id
HAVING
cnt = 0

cpev.attribute_id=73 is name attribute id.

Get Products which don’t have Images in Magento – Mysql Query

Leave a Reply

Scroll to top