sqlsales=$@"select sum(t1.quantity_shipped*t2.bailun_sku_unit_price) from
(select quantity_shipped, origin_order_id, bailun_sku from dc_base_oms_pick where has_delete = 0 and shipping_status = 'TotalShipping' and shipping_time >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and shipping_time < '{end.ToString("yyyy-MM-dd HH:mm:ss")}') t1
join dc_base_oms_sku t2 on t1.origin_order_id = t2.origin_order_id and t1.bailun_sku = t2.bailun_sku and t2.has_delete = 0";
join dc_base_oms_pick t2 on t1.bailun_order_id=t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and t2.has_delete=0 and t2.shipping_status='TotalShipping' and t2.company_id=1
where t1.has_scalp=0 and t1.has_delete=0 and t1.has_innersale=0 and t1.bailun_order_status!='Canceled' and t1.has_innersale=0 and t1.company_id=1 and ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA')
and t2.shipping_time>='{start.ToString("yyyy-MM-dd")}' and t2.shipping_time<'{end.ToString("yyyy-MM-dd")}'
where t1.has_delete=0 and t1.company_id=1 and t1.bailun_order_status!='Canceled' and t1.create_time>='{start.ToString("yyyy-MM-dd")}' and t1.create_time<'{end.ToString("yyyy-MM-dd")}'