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 发布
本文展示了一段SQL查询语句,用于获取2016年3月1日至3月2日期间特定商店ID为1的商品销售数据,包括商品周期、SKU、价格、产品名称和订购数量,并按订购数量降序排列。
1023

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



