Skip to content

Instantly share code, notes, and snippets.

@itaymesh
Created April 9, 2018 10:47
Show Gist options
  • Save itaymesh/d7f316b3b156253a000b6f4ae55ae67b to your computer and use it in GitHub Desktop.
Save itaymesh/d7f316b3b156253a000b6f4ae55ae67b to your computer and use it in GitHub Desktop.
Find products w/o images + status and qty
SELECT p.sku, p.entity_id, i.value as status, s.qty as qty
from catalog_product_entity p
left join catalog_product_entity_int i on p.entity_id = i.entity_id and i.store_id = 0
left join cataloginventory_stock_item s on p.entity_id = s.product_id and s.store_id
where p.entity_id not in (SELECT entity_id FROM `catalog_product_entity_varchar` where attribute_id = 87)
and i.attribute_id = 97
ORDER BY `status` DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment