get the details of employees who manage a department.
SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T1.employee_id  =  T2.manager_id
employees who manage a department implies joining employees table with departments table on department_id; manager of a department is indicated by employee_id being equal to manager_id in departments table;