bhavesh somani

bhavesh somani

1 Articles Published

Articles by bhavesh somani

1 articles

How to Find Nth Highest Salary in SQL

SQL
bhavesh somani
bhavesh somani
Updated on 06-Aug-2024 6K+ Views

In this article, we will write an SQL(Structured Query Language) query to find the Nth highest salary from a database table. We can obtain the 2nd highest salary, 3rd highest salary, and so on. Certainly, This is the most commonly asked question in an interview. There are different methods to achieve this, we will understand every technique in detail. Problem Statement Assume we have a table named employees with 3 columns namely, EmployeeId, EmployeeName and, EmployeeSalary as shown below − EmployeeId EmployeeName EmployeeSalary 10001 Mahesh 33000 10002 John 35000 10003 Abdul 34500 ...

Read More
Showing 1–1 of 1 articles
« Prev 1 Next »
Advertisements