Leetcode每日一题:181.employees-earning-more-than-their-managers(超过经理收入的员工)

在这里插入图片描述

思路:回忆起了SQL语句之后,一道道题就感觉挺容易了,这道题直接就是一个内连接就能解决;
在这里插入图片描述
代码:

# Write your MySQL query statement below
select e1.Name as Employee
from Employee e1,Employee e2
where e1.ManagerId=e2.Id and e1.Salary>e2.Salary

猜你喜欢

转载自blog.csdn.net/wyll19980812/article/details/108179241
今日推荐