Pooja Patel28 days agoMost voted8
salaries 100, 100, 90, 80
ROW_NUMBER: 1 2 3 4
RANK: 1 1 3 4 (skips after a tie)
DENSE_RANK: 1 1 2 3 (no gaps)
always mix up the first two. small example anyone?
salaries 100, 100, 90, 80
ROW_NUMBER: 1 2 3 4
RANK: 1 1 3 4 (skips after a tie)
DENSE_RANK: 1 1 2 3 (no gaps)
and that's why nth highest salary should use DENSE_RANK
if your college lab has mysql 5.7 these won't work at all, need 8+. wasted an hour on that
Structured lessons on DSA, core CS, Java and interview skills, each ending in a quiz so you know it stuck.