I am trying to get a table that displays:
SKU
product_id
is_in_stock
I got this which displays SKU and Product ID in a table and I want to add is_in_stock to it, I got this:
SELECT entity_id as product_id, sku FROM catalog_product_entity;
catalog_product_entity table:
I need to add is_in_stock column now from table cataloginventory_stock_item
, this table holds the product ID column.
How can I do that?
This is my output, I need to add a column is_in_stock to it from different table but am struggling:
2
Answers
Found the query I was looking for. It was this if anyone even needs it:
See MySQL Join Made Easy to get the logic of the query below: