SQL : Creating user defined Function for solving Nth Highest Salary problem
SQL Leetcode Question No. 177 . Nth Highest Salary Hello All, We are back with another SQL problem to gain understanding about SQL. This blog-post focuses on SQL user defined function. To know more about SQL user defined function, I highly recommend this blog-post. Learn SQL: User-Defined Functions (sqlshack.com) Give a try to solve below problem. Solution is provided as usual. Feel free to comment if any queries and also suggest alternate approach to solve this problem. Have a Happy Learning ! SQL Schema Table: Employee +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | salary | int | +-------------+------+ id is the primary key column for this table. Each row of this table contains information about the salary of an employee. Write an SQL query to report the n th highest salary from the Employee table. If there is no n th highest salary, the query should repo...