2016-03-31 9 views
-2
select concat(m.first_name, ' ' , m.last_name) manager_id, 
    concat(e.first_name, ' ' , e.last_name) employee_id  

from employees e 
left join employees m on m.employee_id = e.manager_id 

order by manager_id; 
+0

としてスーパーバイザとEMPLOYEE_ID列名としてMANAGER_ID列名を変更することで問題を抱えています。 –

答えて

0
SELECT CONCAT(m.first_name, ' ' , m.last_name) AS mgr_Fullname, 
manager_id AS Supervisor, 
CONCAT(e.first_name, ' ' , e.last_name) AS emp_Fullname, 
employee_id AS Employee FROM employees e LEFT JOIN employees m 
ON m.employee_id = e.manager_id ORDER BY manager_id; 
関連する問題