2021-02-21

2021-02-21

SELECT * 
FROM employees
ORDER BY hire_date DESC 
LIMIT 2,1 ;

考虑去重:

SELECT * 
FROM employees
WHERE hire_date = (
    SELECT DISTINCT hire_date
    FROM employees
    ORDER BY hire_date DESC 
    LIMIT 2,1 
)
上一篇:mysql之分组函数10


下一篇:牛客在线编程练习:SQL61_较难