I just don't know how to get all simple product's stock and SKU information with SQL Query. I just need to get something like this
SKU Quantity Stock Status --- -------- ------------ 454645 50 1 545878 15 1
Any help please.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Here is my result. Maybe someone will need this. This is for v2.1.5. And to get only simple products.
select catalog_product_entity.sku, cataloginventory_stock_item.qty, cataloginventory_stock_status.stock_status from catalog_product_entity join cataloginventory_stock_item on catalog_product_entity.entity_id = cataloginventory_stock_item.product_id join cataloginventory_stock_status on catalog_product_entity.entity_id = cataloginventory_stock_status.product_id where type_id = "simple";