#案例:查询员工名和上级的名字,通过员工名找到上级id,再通过上级id找到上级的员工名

SELECT
    e.employee_id,e.last_name,m.manager_id,m.last_name
FROM
    employees AS e,employees AS m
WHERE
    m.employee_id=e.manager_id