Problem
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
Id | Name | Salary | ManagerId |
---|---|---|---|
1 | Joe | 70000 | 3 |
2 | Henry | 80000 | 4 |
3 | Sam | 60000 | NULL |
4 | Max | 90000 | NULL |
Given the Employee table, write a SQL query that finds out employees who earn more than their managers. For the above table, Joe is the only employee who earns more than his manager.
Employee |
---|
Joe |
select e.Name as "Employee" from Employee e join Employee m on (e.ManagerId = m.Id) where e.Salary > m.Salary;
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/32354.html
摘要:问题是,他们有没有一种默认的文化或深思熟虑的文化这个不同就是计划与远见。没有一个强壮的为什么,对于如何创造一个强壮和深思熟虑的文化会很难。一种可以帮助简历并保持一种深思熟虑的文化的方式,是雇佣是同时考察技能与价值观。 原文: https://www.linkedin.com/wuko...翻译: 麦芽面包 在商业和咨询界文化最近变成了一个很火的话题。当你提到这个话题时每个人都会变得很...
摘要:思路普通解法,遍历每一个细胞求值,用一个的矩阵存放结果。求值过程,稍微分析一下可知,其实就是按照以下的矩阵进行结果是可数的。 According to the Wikipedias article: The Game of Life, also knownsimply as Life, is a cellular automaton devised by the Britishmath...
Problem According to the Wikipedias article: The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. Given a board with m ...
摘要:板上的每个小格子有两种状态,或。而根据游戏规则,每一次这个板上的内容将会随着前一次板上的内容发生变化。然后再根据当前格子的状态计算当前格子的下一个状态。当然最后别忘了将原始状态传递出去。 题目要求 According to the Wikipedias article: The Game of Life, also known simply as Life, is a cellular...
摘要:保证高的小朋友拿到的糖果更多,我们建立一个分糖果数组。首先,分析边界条件如果没有小朋友,或者只有一个小朋友,分别对应没有糖果,和有一个糖果。排排坐,吃果果。先往右,再往左。右边高,多一个。总和加上小朋友总数,就是要准备糖果的总数啦。 Problem There are N children standing in a line. Each child is assigned a rat...
阅读 711·2021-11-22 13:54
阅读 2642·2021-09-28 09:36
阅读 1136·2021-09-14 17:57
阅读 2802·2019-08-30 15:55
阅读 1846·2019-08-30 15:44
阅读 440·2019-08-29 12:31
阅读 2471·2019-08-28 18:18
阅读 1089·2019-08-26 13:58