SELECT *
FROM (SELECT T2.*, ROW_NUMBER()
OVER(PARTITION BY MAE_NAME ORDER BY TIME_STAMP_END DESC) AS RN2 FROM
(SELECT T1.*,
ROW_NUMBER() OVER(PARTITION BY MAE_NAME, PRODUCT, OP, VERSION ORDER BY TIME_STAMP_END DESC) AS RN1
FROM CONDITION_CSV T1) WHERE RN1 = 1) T2
WHERE RN2 < 11