" ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n"+
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n"+
" AND a.MaterialCode = b.MaterialCode\n"+
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n"+
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n"+
" LEFT JOIN ( SELECT Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount ) temp3 ON temp1.[结算验收单号] = temp3.HQHKanBan \n"+
" LEFT JOIN ( SELECT SUM(Qty) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n"+