SQL Medium Leetcode Problem Solved (

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • 📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-...
    🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql...
    This is a medium-level SQL question on Leetcode.
    In this video, you'll learn what this problem is (Find the Nth Highest Salary), and how to solve it using SQL.
    You'll also see how to fix the runtime errors often found in this solution, and how to include the parameter from the stored procedure.
    ⏱ TIMESTAMPS:
    00:00 - The problem
    01:51 - Step one for the solution
    03:22 - Inside the function
    04:56 - Making progress
    06:14 - Include the parameter
    🔗 VIDEO LINKS:
    Leetcode problem: leetcode.com/problems/nth-hig...
  • Věda a technologie

Komentáře • 4

  • @TimL_
    @TimL_ Před měsícem +2

    Brilliant, thanks! It is convenient that offset returns null if there are not enough rows. One correction: you need to select distinct salary values, otherwise some test cases will fail.

    • @DatabaseStar
      @DatabaseStar  Před měsícem

      That's a good point. The script had passed the existing test cases, but yes if there was different data then we may need to find the distinct values.

  • @balb4903
    @balb4903 Před měsícem +1

    Great video your solution to the problem is amazingly well explained