数据库里面运算脚本
1 SELECT od1.ProductID AS ProductID1, od2.ProductID AS ProductID2, od1.ProcessCenterID, COUNT(1) AS TogethorCount 2 FROM OrderDetails od1 3 INNER JOIN OrderDetails od2 ON od1.OrderID = od2.OrderID AND od1.ProductID <> od2.ProductID 4 GROUP BY od1.ProductID, od2.ProductID, od1.ProcessCenterID 5 HAVING TogethorCount >= 3