@@ -402,21 +402,14 @@ sum(case when TIMESTAMPDIFF(day,t1.pay_time,now())<=7 then t1.bailun_sku_quantit
...
@@ -402,21 +402,14 @@ sum(case when TIMESTAMPDIFF(day,t1.pay_time,now())<=7 then t1.bailun_sku_quantit
from dc_base_sku as t2
from dc_base_sku as t2
left join dc_base_oms_sku as t1 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
left join dc_base_oms_sku as t1 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
left join dc_auto_config_sku_warehouse as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
left join dc_auto_config_sku_warehouse as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
where t2.warehouse_code='BLGZ03' and (t1.id is null or t1.bailun_order_status!='Canceled') and (t3.`status`=0 or t3.`status` is null)
where t2.warehouse_code='BLGZ03' and (t1.id is null or t1.bailun_order_status!='Canceled') and (t3.`status`=0 or t3.`status` is null) and t2.push_time >= '2010-01-01'
GROUP BY t2.product_inner_code,t2.warehouse_code
GROUP BY t2.product_inner_code,t2.warehouse_code
);
);
alter table dc_not_stock_goods_sales rename dc_not_stock_goods_salesTemp;
alter table dc_not_stock_goods_sales rename dc_not_stock_goods_salesTemp;
alter table dc_not_stock_goods_sales_temp rename dc_not_stock_goods_sales;
alter table dc_not_stock_goods_sales_temp rename dc_not_stock_goods_sales;
alter table dc_not_stock_goods_salesTemp rename dc_not_stock_goods_sales_temp;
alter table dc_not_stock_goods_salesTemp rename dc_not_stock_goods_sales_temp;