美文网首页
181. Employees Earning More Than

181. Employees Earning More Than

作者: wenmingxing | 来源:发表于2018-07-16 11:41 被阅读48次
    题目链接:

    181. Employees Earning More Than Their Managers

    解析:

    这是一道常见的类型题目,我们需要两次使用Employee表。

    题解:
    # Write your MySQL query statement below
    SELECT E1.Name AS Employee FROM Employee E1 JOIN Employee E2 
    ON E1.ManagerId = E2.Id AND E1.Salary > E2.Salary;
    

    相关文章

      网友评论

          本文标题:181. Employees Earning More Than

          本文链接:https://www.haomeiwen.com/subject/qknvpftx.html