select a.last_name, a.department_id, b.department_name from employees as a,departments as b where a.department_id=b.department_idSELECT e.job_id,d.location_id from employees as e join departments as d on d.department_id=e.department_id WHERE d.department_id=90select employees.last_name, departments.department_name, locations.location_id, locations.city from employees left join departments on departments.department_id=employees.department_id left join locations on departments.location_id=locations.location_id where commission_pct is not nullselect last_name, job_id, employees.department_id , department_name from employees left join departments on employees.department_id=departments.department_id left join locations on departments.location_id=locations.location_id where locations.city='Toronto'select department_name,city,last_name, job_title, salary from departments left join employees on employees.department_id=departments.department_id left join locations on departments.location_id=locations.location_id left join jobs on employees.job_id=jobs.job_id where department_name="Executive"select e.last_nameemployees, e.employee_idEmp#,m.last_namemanager, m.employee_idMgr#from employees e left join employees m on e.manager_id = m.employee_idselect department_name from departments left join employees on departments.department_id=employees.department_id where employees.department_id is nullSELECT city from locations left join departments on locations.location_id = departments.location_id where departments.location_id is nullselect employees.* from employees left join departments on employees.department_id = departments.department_id where department_name = "Sales" or department_name = "IT"让时间为你证明