Dim sql As String = "Select * from {运费明细} As a inner join (Select 物流单号,店铺,sum(数量) As 销售数量 from {管家销售明细账} group by 物流单号,店铺) As b on a.物流单号 = b.物流单号"
Dim sq2 As String = "Select * from {运费明细} As a inner join (Select 退货物流单号,店铺,sum(数量) As 退货数量 from {管家退货明细账} group by 退货物流单号,店铺) As b on a.物流单号 = b.退货物流单号"