SQL Interview Question | Use Different Methods to Find the Nth Highest Salary

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 7

  • @chinmaymishra5086
    @chinmaymishra5086 Месяц назад

    Instead of dense rank, we could use row number function, which helps better

    • @skilltechath0n
      @skilltechath0n  Месяц назад

      Great suggestion, using row_number() can also be a solution.

    • @shripaddeshpande5766
      @shripaddeshpande5766 Месяц назад

      I think no, row number will give salary in 3rd row that may not be 3rd highest salary. Dense rank is correct.

  • @sweetsubha514
    @sweetsubha514 Месяц назад

    Nicely explained 😃👍👍👌👌👌👌👌

    • @skilltechath0n
      @skilltechath0n  Месяц назад

      Appreciate the support! Keep practicing your SQL skills.

  • @Frelek321
    @Frelek321 Месяц назад +1

    can u provide scripts for table and insert -> CHECK COMMENT

    • @skilltechath0n
      @skilltechath0n  Месяц назад

      @Frelek321 Thank you for the suggestion. I have added the query to create table and insert values in the description. I hope it helps. Keep practicing :)