从黄丹那里获取销量

Posted caohuimingfa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了从黄丹那里获取销量相关的知识,希望对你有一定的参考价值。

select
p.sku_id as skuId,
p.sku_name as skuName,
p.sku_unit as skuUnit,
p.sku_price_unit as skuPriceUnit,
p.unit_price_num as unitPriceNum,
p.c1_id as c1Id,
p.c1_name as c1Name,
p.c2_id as c2Id,
p.c2_name as c2Name,
m.city_id as cityId,
d.warehouse_id as warehouseId,
d.delivery_date_type as deliveryDateType,
d.delivery_time as deliveryTime,
sum(p.num*p.unit_sku_num) as sales
from
t_pop_order_main m
left join t_pop_order_product p on m.id=p.order_id
left join t_pop_order_delivery d on m.delivery_id=d.id
where p.pop_id=1252
and p.sku_id in(533864)
and d.delivery_time >=1537545600
and d.delivery_time <=1537631999
and m.status>1
and m.is_deleted=0
group by p.sku_id, d.warehouse_id, d.delivery_date_type

 

 

===============================================

select
p.sku_id as skuId,
p.sku_name as skuName,
p.sku_unit as skuUnit,
p.sku_price_unit as skuPriceUnit,
p.unit_price_num as unitPriceNum,
p.c1_id as c1Id,
p.c1_name as c1Name,
p.c2_id as c2Id,
p.c2_name as c2Name,
m.city_id as cityId,
d.warehouse_id as warehouseId,
d.delivery_date_type as deliveryDateType,
d.delivery_time as deliveryTime,
sum(p.num*p.unit_sku_num) as sales
from
t_pop_order_main m
left join t_pop_order_product p on m.id=p.order_id
left join t_pop_order_delivery d on m.delivery_id=d.id
where p.pop_id=1252
and p.sku_id in(533864)
and d.c_t >=1537372800
and d.c_t <=1537459199
and m.status>1
and m.is_deleted=0
group by p.sku_id, d.warehouse_id, d.delivery_date_type



















































以上是关于从黄丹那里获取销量的主要内容,如果未能解决你的问题,请参考以下文章

如何从用户那里获取字母表

从孩子那里获取属性

如何从联系人那里获取电子邮件

在 Qt 中从用户那里获取几个值?

我如何从发件人那里获取标签值

Autodesk 从孩子那里获取骨灰盒数据