标签:turn func order select http 简单 strong Nid cond
1.【简单】组合两个表
select p.FirstName,p.LastName,a.City,a.State from person p left join address a on p.personid=a.personid;
2.【简单】第二高的薪水
select ifnull((select distinct(Salary) from Employee order by Salary desc limit 1,1),null) as SecondHighestSalary;
3.【中等】第N高的薪水
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
set n=n-1;
RETURN (
# Write your MySQL query statement below.
select distinct Salary as getNthHighestSalary
from Employee
order by Salary DESC
limit N,1
);
END
4.【简单】有趣的电影
标签:turn func order select http 简单 strong Nid cond
原文地址:https://www.cnblogs.com/hankleo/p/13230321.html