![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
icecoola_
这个作者很懒,什么都没留下…
展开
-
leetcode_Oracle_197. 上升的温度_偏移分析函数 lag()与lead()
197. 上升的温度 ORACLE 偏移分析函数 lag()与lead() 用法 select temp.id as "Id" from (select id, recorddate r2, Temperature as t2, lag(Temperature, 1, null) over(order ...原创 2020-04-21 23:32:04 · 311 阅读 · 0 评论 -
leetcode_Oracle_176. 第二高的薪水
176. 第二高的薪水 SELECT MAX(Salary) AS "SecondHighestSalary" FROM Employee where salary < ( SELECT MAX(Salary) FROM Employee )原创 2020-04-16 03:09:56 · 347 阅读 · 0 评论 -
leetcode_Oracle_184. 部门工资最高的员工
184. 部门工资最高的员工 select depart.Name as "Department", temp.Name as "Employee" , temp.Salary as "Salary" from Employee temp,Department depart where temp.DepartmentId = depart.Id and (temp.Salary,tem...原创 2020-04-09 00:44:00 · 324 阅读 · 0 评论 -
leetcode_Oracle_178. 分数排名
178. 分数排名 row_number() 是没有重复值的排序 dense_rank() 是连续排序,两个第二名仍然跟着第三名 rank() 是跳跃拍学,两个第二名下来就是第四名 select Score as "Score", dense_rank() over(order by Score desc) as "Rank" from Scores select B.S...原创 2020-04-07 02:06:08 · 240 阅读 · 0 评论 -
leetcode_Oracle_181. 超过经理收入的员工
181. 超过经理收入的员工 select a.Name as "Employee" from Employee a ,Employee b where a.ManagerId = b.Id and a.Salary >b.Salary select a.Name as "Employee" from Employee a where a.salary > (selec...原创 2020-04-05 10:35:16 · 220 阅读 · 0 评论 -
leetcode_Oracle_175. 组合两个表
175. 组合两个表 select b.FirstName as "FirstName", b.LastName as "LastName", a.City as "City", a.State as "State" from Person b left join Address a on a.PersonId = b.PersonId select b.FirstName as "F...原创 2020-04-04 18:51:56 · 198 阅读 · 0 评论 -
leetcode_Oracle_620. 有趣的电影
620. 有趣的电影 select id as "id", movie as "movie", description as "description", rating as "rating" from cinema where description <>'boring' and mod(id,2)=1 order by rating desc;原创 2020-04-03 14:05:54 · 182 阅读 · 0 评论 -
leetcode_Oracle_595. 大的国家
595. 大的国家 select name as "name",population as "population", area as "area" from world where area>3000000 union select name as "name",population as "population", area as "area" from world where po...原创 2020-04-03 13:19:21 · 208 阅读 · 0 评论 -
leetcode_Oracle_182. 查找重复的电子邮箱
182. 查找重复的电子邮箱 select Email as "Email" from ( select Email,count(1) as counts from Person group by Email) temp where temp.counts>1; select distinct a.Email as "Email" from Person a,Person b whe...原创 2020-04-03 10:17:48 · 591 阅读 · 0 评论