07 2020 档案
leetcode177
摘要:1 CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT 2 BEGIN 3 SET N := N - 1; 4 RETURN ( 5 # Write your MySQL query statement below. 6 select (se 阅读全文
posted @ 2020-07-23 16:13 Sempron2800+ 阅读(108) 评论(0) 推荐(0)
leetcode176
摘要:select (select distinct Salary from Employee order by Salary desc limit 1,1) as SecondHighestSalary 注意加distinct,如果不加这个关键字,无法通过测试。 阅读全文
posted @ 2020-07-22 20:10 Sempron2800+ 阅读(104) 评论(0) 推荐(0)
leetcode175
摘要:leetcode数据库的题目,组合两个表,使用left join查询。 select p.FirstName,p.LastName,a.City,a.State from Person p left join Address a on p.PersonId = a.PersonId; 阅读全文
posted @ 2020-07-22 17:15 Sempron2800+ 阅读(124) 评论(0) 推荐(0)