SQL17 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary

https://www.nowcoder.com/practice/8d2c290cc4e24403b98ca82ce45d04db?tpId=82&tags=&title=&difficulty=0&judgeStatus=0&rp=1

SELECT s.emp_no,s.salary
FROM salaries s
WHERE s.salary = (
    SELECT DISTINCT salary from salaries 
    order by salary DESC
    LIMIT 1,1
)
ORDER BY s.emp_no;

(这是第一次自己的做出的题目,加油)

上一篇:SQL19 查找所有员工的last_name和first_name以及对应的dept_name


下一篇:Java 调用并执行cmd命令