EasyOutput prediction

Self join with LEFT JOIN for hierarchy

Given this table (employees):

idnamemanager_id
1AliceNULL
2Bob1
3Carol1

What does this query return?

SELECT e.name AS employee, m.name AS manager
FROM employees e
LEFT JOIN employees m ON e.manager_id = m.id;

← → arrow keys to navigate

Sign in to save your progress.

Self join with LEFT JOIN for hierarchy - SQL Self Joins Quiz | Unnested