d-stream, SELECT DISTINCT Customers.CustomerName
FROM [Customers]
JOIN Orders ON Customers.CustomerID = Orders.CustomerID
JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID
JOIN Products ON OrderDetails.OrderDetailID = Products.ProductID
Group by Orders.OrderID,Products.CategoryID
HAVING COUNT (Products.CategoryID) >1
так ? :(
SELECT DISTINCT Customers.CustomerName
FROM [Customers]
JOIN Orders ON Customers.CustomerID = Orders.CustomerID
JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID
JOIN Products ON OrderDetails.OrderDetailID = Products.ProductID
Group by CategoryID
ORDER BY COUNT(Products.CategoryID)>1
FROM [Customers]
JOIN Orders ON Customers.CustomerID = Orders.CustomerID
JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID
JOIN Products ON OrderDetails.OrderDetailID = Products.ProductID
Group by Orders.OrderID,Products.CategoryID
HAVING COUNT (Products.CategoryID) >1
так ? :(