ROW_NUMBER, RANK and DENSE_RANK on ties
QuizMediumAsked in: Cognizant, Roblox
The salaries 100, 90, 90 and 80 are ranked with ORDER BY salary DESC. Which line is right?
- ROW_NUMBER 1, 2, 3, 4; RANK 1, 2, 2, 4; DENSE_RANK 1, 2, 2, 3
- ROW_NUMBER 1, 2, 2, 3; RANK 1, 2, 2, 4; DENSE_RANK 1, 2, 3, 4
- All three give 1, 2, 2, 3
- RANK 1, 2, 2, 3; DENSE_RANK 1, 2, 2, 4
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.