varsql=$@"select sum(t2.amount_sales*t1.quantity_shipped) as amount_sales,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname,t2.order_currency,t2.platform_type from dc_base_oms_pick t1
varsql=$@"select sum(t2.amount_sales*t1.quantity_shipped) as amount_sales,if(t6.financecategoryname is null,'',t6.financecategoryname) as financecategoryname,t2.order_currency,t2.platform_type,t2.website 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') or t2.platform_type='FBA') and t2.has_scalp = 0 and t2.has_innersale = 0 and t2.has_delete=0 and t2.company_id=1
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') or t2.platform_type='FBA') and t2.has_scalp = 0 and t2.has_innersale = 0 and t2.has_delete=0 and t2.company_id=1
left join dc_base_sku t5 on t2.bailun_sku=t5.bailun_sku
left join dc_base_sku t5 on t2.bailun_sku=t5.bailun_sku
left join dc_base_sku_finance_category t6 on t6.bailuncategoryid=t5.bailun_category_id
left join dc_base_sku_finance_category t6 on t6.bailuncategoryid=t5.bailun_category_id