Following are my query,
SELECT cpe.sku AS Sku, ccp.category_id AS Category_Ids FROM catalog_product_entity cpe JOIN catalog_category_product ccp ON cpe.entity_id = ccp.product_id
return value like,
Sku Category_Ids 1 34 1 36 1 37 2 65 2 87
How to merge like,
Sku Category_Ids 1 34,36,37 2 65,87
Solved! Go to Solution.
@AveevaHere you go:
SELECT cpe.sku AS Sku, group_concat(ccp.category_id) AS Category_Ids FROM catalog_product_entity cpe JOIN catalog_category_product ccp ON cpe.entity_id = ccp.product_id GROUP BY cpe.sku
@AveevaHere you go:
SELECT cpe.sku AS Sku, group_concat(ccp.category_id) AS Category_Ids FROM catalog_product_entity cpe JOIN catalog_category_product ccp ON cpe.entity_id = ccp.product_id GROUP BY cpe.sku