so you want to only consider max value for DateChange? then use this instead
SELECT OrderNo, DeliveryDate, DateChange, DateSchedule
FROM
(
SELECT *,ROW_NUMBER() OVER (PARTITION BY OrderNo ORDER BY DeliveryDate DESC,DateChange DESC) AS Seq
FROM sales
)t
WHERE Seq=1
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/