I need a sql query to get the all sku based on the category id
Following are the tables which stores category and product data:
catalog_product_entity
catalog_category_product
Thanks
Your Sql query will be like this:
`SELECT * FROM catalog_product_entity where entity_id in (SELECT product_id FROM catalog_category_product where category_id = {YourCategoryId})`.
SELECT product.entity_id as product_id, product.sku FROM catalog_product_entity as product
INNER JOIN catalog_category_product as cat_prod on product.entity_id = cat_prod.product_id
WHERE cat_prod.category_id=YOUR Category ID;
Tried using inner join,this one also worked