@nandini_rao
Member since 24 August 2026
Reporting analyst. Learning SQL window functions properly.
- 1
- threads
- 3
- replies
- 0
- reputation
Threads
RANK() leaves gaps in my ranking. Is that a bug?
I rank students by score with a window function and the numbers skip: 1, 2, 2, 4. I expected 1, 2, 2, 3. SELECT name, score, RANK() OVER (ORDER BY score DESC) AS position FROM…
QuestionSQL and databases#sql#window-functionsby nandini_rao2 replies
Recent replies
- RANK() leaves gaps in my ranking. Is that a bug?
That is exactly it, DENSE_RANK() gives 1, 2, 2, 3. Thank you for the table, it made the difference between the three obvious.
- What SQL do junior analyst interviews actually ask?
In the ones I did: joins (inner against left, and what happens to unmatched rows), GROUP BY with HAVING, finding duplicates, and one window…
- I know Excel well but no SQL. What is a sensible order to learn things?
I made the same move. What helped me was recreating one of my own Excel reports in SQL. Same numbers on both sides means you understood it.