Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLwindow functions ROW_NUMBER RANKSingle-choice MCQ

For this data, what value does the highlighted query assign to the row with salary 5000 in dept 'A', where dept 'A' has salaries 7000, 5000, 5000?

SELECT salary, RANK() OVER (PARTITION BY dept ORDER BY salary DESC) FROM emp;