SELECT tblCategory.CategoryOrder, tblProducts.ProductName, Sum(tblOrderDetails.Quantity) AS SomVanQuantity, tblOrderDetails.OrderID, tblCategory.CategoryName
FROM (tblCategory INNER JOIN tblProducts ON tblCategory.CategoryID = tblProducts.CategoryID) LEFT JOIN tblOrderDetails ON tblProducts.ProductID = tblOrderDetails.ProductID
GROUP BY tblCategory.CategoryOrder, tblProducts.ProductName, tblOrderDetails.OrderID, tblCategory.CategoryName
ORDER BY tblCategory.CategoryOrder, tblProducts.ProductName;