题解 | #获员工的emp_n以及其对应的薪水salary
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
https://www.nowcoder.com/practice/8d2c290cc4e24403b98ca82ce45d04db
select emp_no ,salary from salaries where salary = ( select salary from salaries group by salary order by salary desc limit 1 offset 1 ) order by emp_no ;
遇到这种题,对所求属性有条件而且比较复杂的,一般直接子查询