I\'ve the below result
VendorName | IncidentID | IncidentStatus | IncidentDate
-------------------------------------------------------
XYZ | 100 |
This will do it ...
ORDER BY MAX(INCIDENTDATE) OVER (PARTITION BY VENDORNAME) DESC, INCIDENTDATE DESC
... but I'm not sure if the analytic function is allowed in the ORDER BY. If it isn't, calculate it in a subquery and order by in the main query ...
select ...
from (
select Max(incidentdate) over (partition by vendorname) max_incidentdate_by_vendor,
...)
order by max_incidentdate_by_vender desc, incidentdate desc