題目描述
[查找入職員工時間排名倒數第三的員工所有信息](https://www.nowcoder.com/practice/ec1ca44c62c14ceb990c3c40def1ec6c?tpId=82&tqId=29754&tPage=1&rp=&ru=/ta/sql&qru=/ta/sql/question-ranking
CREATE TABLE
employees` (
CREATE TABLE `employees` (
`emp_no` int(11) NOT NULL,
`birth_date` date NOT NULL,
`first_name` varchar(14) NOT NULL,
`last_name` varchar(16) NOT NULL,
`gender` char(1) NOT NULL,
`hire_date` date NOT NULL,
PRIMARY KEY (`emp_no`));
Code:
select * from employees where hire_date = (select distinct hire_date from employees order by hire_date desc limit 2,1);
喜歡折騰代碼的加羣(羣號:822286811)一起交流學習【Java、python、VBA、Shell、Linux、dos、數據分析、拆機、裝系統技術交流羣】
點擊鏈接加入羣聊【計算機技術交流】