Направихте всичко правилно.
SELECT Emp_NR, Emp_Name
FROM (
SELECT ROW_NUMBER() OVER (PARTITION BY Emp_Name ORDER BY Emp_NR DESC) AS RN, Emp_Name, Emp_NR
FROM YourTable
) AS T
WHERE T.RN = 1;
Това е правилният синтаксис.
Направихте всичко правилно.
SELECT Emp_NR, Emp_Name
FROM (
SELECT ROW_NUMBER() OVER (PARTITION BY Emp_Name ORDER BY Emp_NR DESC) AS RN, Emp_Name, Emp_NR
FROM YourTable
) AS T
WHERE T.RN = 1;
Това е правилният синтаксис.