SELECT t1.period,t2.sku,t3.`value` AS price ,t1.product_name,t1.qty_ordered
from sales_bestsellers_aggregated_daily AS t1
LEFT JOIN catalog_product_entity AS t2 ON t1.product_id=t2.entity_id
LEFT JOIN catalog_product_entity_decimal AS t3 ON t1.product_id=t3.entity_id
where t1.period >= '2016-03-01' AND t1.period <= '2016-03-02' AND t1.store_id=1 AND t3.attribute_id=75
ORDER BY qty_ordered DESC
[Magento SQL] 获取一定日期范围内销售最好的产品,返回sku,qty_ordered,price,product_name
最新推荐文章于 2021-03-26 12:57:41 发布