LeetCode 181. Employees Earning More Than Their Managers (超过经理收入的员工)
题目标签:
题目给了我们一个 员工表,包括经理。员工会有经理的id。
这里可以重复 利用两次 表格,表格a, 表格b,当a 员工的经理id 等于 b员工时候,在从中找到员工工资大于经理的。具体看code。
Java Solution:
Runtime: 312 ms, faster than 65 %
Memory Usage: N/A
完成日期:05/22/2019
关键点:From 员工表a,b
# Write your MySQL query statement below SELECT a.Name AS Employee FROM Employee a, Employee b WHERE a.ManagerId = b.Id AND a.Salary > b.Salary
LeetCode 题目列表 - LeetCode Questions List
题目来源:https://leetcode.com/