Need Assistance?

support@tutorialshub.in

Window Functions (Analytics in SQL)

ROW_NUMBER, RANK & DENSE_RANK

ADVERTISEMENT
PostgreSQL Free Lesson
5 min read
ADVERTISEMENT
  • ROW_NUMBER() — Unique sequential numbers (1, 2, 3, 4).
  • RANK() — Ties share the same rank, leaving gaps (1, 2, 2, 4).
  • DENSE_RANK() — Ties share the same rank with no gaps (1, 2, 2, 3).
ADVERTISEMENT
Hi, I'm Tuby! Here to help you