ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Write a query to find second highest salary of an employee?

user-image
تم إضافة السؤال من قبل Muhammad Shahid Farooq , Software Engineer, System Integrator , ForeVision Business Solutions
تاريخ النشر: 2017/03/16

SELECT Name FROM   Employees WHERE  Salary = (SELECT MIN(Salary) FROM   (SELECT DISTINCT TOP (2) Salary FROM   Employees ORDER  BY Salary DESC) T);

Muhammad Arshad Gondal
من قبل Muhammad Arshad Gondal , Daputy Manager IT , NOON SUGAR MILLS LIMITED

SELECT MAX(SALARY) FROM MASTER WHERE SALARY NOT in(SELECT MAX(SALARY) from master)

 

Muhammad Waqar Arif
من قبل Muhammad Waqar Arif , Senior Database Architect , FINCA Microfinance Bank Limited

SELECT TOP 1 Salary FROM ( SELECT TOP 2 Salary FROM Employee ORDER BY Salary DESC) AS Employee ORDER BY Salary ASC;

Atiqul Islam
من قبل Atiqul Islam , Sr Software Engineer , Prism Informatics Ltd

SELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee )

Shakir Ali
من قبل Shakir Ali , Full Stack Developer , https://www.freelancer.com

Select Top 1 Salary From

(Select Distinct Top 2 

Salary from tblEmployee

Order by Salary)

Result

Order by Salary 

المزيد من الأسئلة المماثلة