12/05/2019

Real Time Scenarios of ORACLE SQL Development - 4

How to find Nth Highest salary in a Team.

Queries:

drop table Employee;

create table Employee(id int,name varchar2(10),sal int);

insert into Employee values(1,'Vishnu',2300);

insert into Employee values(2,'Vinay',4500);

insert into Employee values(3,'Teja',4500);

insert into Employee values(4,'Ashwin',1100);

insert into Employee values(5,'Raj',45000);

select * from Employee;

2nd maximum salary in Employee table.

select id,name,sal from Employee a where 2=(select count(distinct sal) from Employee

b where a.sal<=b.sal);


Note : Distinct key word is used in the sub query as there are same salaries for two employees in the above table. 




4 comments:

  1. Are you a newbie in the world of Gemini digital wallet? Do you want to understand the function of Gemini wallet? To get each and single information about Gemini, all you can dial Gemini customer service number 833-993-0690 and get in touch with the professionals who are available day and night and are always there at the service of the users. Whether its day or Gemini Support Number
    night, you can always speak to the customer care professionals and they will be ready to assist you at any point of time. Their motto is to serve the users.

    ReplyDelete
  2. Being a Gemini exchange digital user, it is quite obvious that getting trapped in the issues or errors is quite normal. Sometimes users fix the issue on their own but sometime they do require customer professional assistance. To get appropriate assistance from the adroit professionals to get rid of your errors, you have to dial Gemini support number immediately. They are trained in this customer field therefore you can’t doubt their services. So, Gemini Support Number feel free to contact customer care anytime as per your needs and requirements. They provide best support to the users.

    ReplyDelete
  3. Are you coming across errors while withdrawing the funds from the Binance exchange? Binance exchange has user-friendly interface but some users because of less knowledge get stuck in such issues. If you’re one of such users and looking for guidance to handle all troubles all at one place under the assistance of experts, you Binance Customer Service Number can always have conversation with the team via calling on Binance customer care number which is working all the time globally and users from any part of the nation can contact them and discuss their queries immediately.

    ReplyDelete
  4. MyEtherWallet two-factor 18778462817 authentication is the important function of the as it provides extra shield to the account and secure it from unwanted troubles. If you don’t have any methods to eliminate all MyEtherWallet Customer Service Number troubles from the roots and seeking guidance, you can always approach the team of skilled experts via calling on MyEtherWallet customer service number which is always functional and the team helps you out at every step so connect with them for the better results and remedies.

    ReplyDelete

ads