mahir_data
hardSime Darby · joinsBasic

Pair every employee with their manager

The employees table stores each employee's manager as another employee's id (manager_id). For every employee, return their name and their manager's name.

Employees with no manager (e.g. the top of the org chart) should still appear, with a NULL manager name.

Return employee and manager_name.

Schema

employees
idINT
nameTEXT
manager_idINT

Basic

The example input, expected output, and walkthrough for this question unlock with a Basic plan.

Basic

This is a Basic question

Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.

See Basic plans