#返回sku,price,specialPrice,上下架状态,库存
#我这里catalog_product_entity_decimal表里attribute_id=75的value 是price
#catalog_product_entity_decimal表里attribute_id=76的value 是specialPrice
#
SELECT t1.sku,t2.`value`,t4.`value`,t3.`value` AS status,t5.qty FROM catalog_product_entity AS t1
LEFT JOIN (SELECT * from catalog_product_entity_decimal WHERE attribute_id=75) AS t2 ON t2.entity_id=t1.entity_id
LEFT JOIN (SELECT * from catalog_product_entity_decimal WHERE attribute_id=76) AS t4 ON t4.entity_id=t1.entity_id
LEFT JOIN catalog_product_entity_int AS t3 ON t3.entity_id=t1.entity_id
LEFT JOIN cataloginventory_stock_item AS t5 ON t5.product_id=t1.entity_id
WHERE t3.attribute_id=96 [Magento SQL] 返回sku,price,specialPrice,上下架状态,库存
最新推荐文章于 2021-10-15 11:28:30 发布
本文展示了如何使用SQL查询语句从数据库中获取电商产品的SKU、价格、促销价、上下架状态和库存等关键信息。
2201

被折叠的 条评论
为什么被折叠?



