sql=$@"select sum(t2.cost_logistics*t1.quantity_shipped) as cost_logistics,t3.hq_type from dc_base_oms_pick t1
join dc_base_oms_sku t2 on t1.bailun_order_id = t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and t2.bailun_order_status != 'Canceled' and t2.has_scalp = 0 and (t2.platform_type!='FBA' and t2.bailun_order_status!='CantHandle') and t2.has_scalp =0 and t2.has_delete=0 and t2.company_id=1
join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
where t1.has_delete=0 and t1.shipping_status = 'TotalShipping' and t1.company_id=1 and t1.shipping_time>='{day.ToString("yyyy-MM-dd")}' and t1.shipping_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}'