📜  如何在 mysql 代码示例中找到第二高的薪水

📅  最后修改于: 2022-03-11 15:05:12.944000             🧑  作者: Mango

代码示例4
#Corelated Subquery
SELECT Id, Salary
FROM Employee e
WHERE 2=(SELECT COUNT(DISTINCT Salary) FROM Employee p
WHERE e.Salary<=p.Salary)