$ 0 0 SELECT ALTKN, DOCNUM, KUNNR FROM TABLE_NAME QUALIFY ROW_NUMBER() OVER(PARTITION BY ALTKN ORDER BY DOCNUM DESC) = 1;
SELECT ALTKN, DOCNUM, KUNNR
FROM TABLE_NAME
QUALIFY ROW_NUMBER() OVER(PARTITION BY ALTKN ORDER BY DOCNUM DESC) = 1;