Try this:-
SELECT c.OrderId, b.[Max Qty]
FROM
(SELECT MAX(Qty) AS [Max Qty]
FROM
(SELECT OrderId, SUM(Quantity) AS Qty
FROM [Order Details]
WHERE OrderId BETWEEN 11000 AND 11005
GROUP BY OrderId) a) b
INNER JOIN
(SELECT OrderId, SUM(Quantity) AS Qty
FROM [Order...