2026/2/19 6:31:45
网站建设
项目流程
网站的内容,济源建设企业网站公司,seo一般包括哪些内容,亚当学院网站视频建设教程第二高的薪水https://leetcode.cn/problems/second-highest-salary/
一 题目
Employee 表#xff1a;
Column NameTypeidintsalaryint id 是这个表的主键。表的每一行包含员工的工资信息。查询并返回 Employee 表中第二高的 不同 薪水 。如果不存在第二高的薪水#xff0c…第二高的薪水https://leetcode.cn/problems/second-highest-salary/一 题目Employee表Column NameTypeidintsalaryintid 是这个表的主键。表的每一行包含员工的工资信息。查询并返回Employee表中第二高的不同薪水 。如果不存在第二高的薪水查询应该返回null(Pandas 则返回 None)。二 示例查询结果示例 1输入Employee 表 ------------ | id | salary | ------------ | 1 | 100 | | 2 | 200 | | 3 | 300 | ------------输出--------------------- | SecondHighestSalary | --------------------- | 200 | ---------------------示例 2输入Employee 表 ------------ | id | salary | ------------ | 1 | 100 | ------------输出--------------------- | SecondHighestSalary | --------------------- | null | ---------------------三 结果select( select distinct salary from Employee order by salary desc limit 1,1 --跳过前一条取一条 ) as SecondHighestSalary