Maconomy version

SELECT 
  MAINVERSIONNUMBER, 
  PATCHNUMBER 
FROM 
(
  SELECT 
    MAINVERSIONNUMBER, 
    PATCHNUMBER, 
    ROW_NUMBER() OVER (ORDER BY MAINVERSIONNUMBER DESC, PATCHNUMBER DESC) RN 
  FROM 
    SYSTEMMAINTENANCELOG
)A
WHERE RN = 1