Leetcode Problem 1978. Employees Whose Manager Left the Company

1978. Employees Whose Manager Left the Company

Leetcode Solutions

Finding Employees with Absent Managers and Salary Below $

  1. Select the employee_id from the Employees table.
  2. Use a WHERE clause to filter for employees with a salary less than $30000.
  3. In the same WHERE clause, check that the manager_id is not present in the list of employee_ids in the Employees table, indicating the manager has left.
  4. Order the results by employee_id.

erDiagram
    Employees {
        int employee_id PK
        varchar name
        int manager_id FK
        int salary
    }

Using LEFT JOIN to Identify Employees with Missing Managers and Low Salaries

Ask Question

Programming Language
image/screenshot of info(optional)
Full Screen
Loading...

Suggested Answer

Answer
Full Screen
Copy Answer Code
Loading...