Workers


SQL Subqueries Public

Hard  

7min

Given the following data definition, write a query that selects the names of employees that are not managers.

TABLE employees
  id INTEGER NOT NULL PRIMARY KEY
  managerId INTEGER REFERENCES employees(id)
  name VARCHAR(30) NOT NULL

See the example case for more details.

SQLite 3.19.3
   

  •   Example case: Wrong answer
  •   No managers: Wrong answer
  •   Workers have managers: Wrong answer
  •   Managers have managers: Wrong answer