0
- Select a list of employees who have changed positions or departments (
job_history
), the list must contain the employee’s registration and name, the name of the department and position that worked, and also the start date and end date (start_date
andend_date
), sort by the start date.
Make a select with Inner Join using Where and another select with Join....
R:
select
E.employee_id,
E.first_name||' '||E.last_name "Nome",
D.department_name,
J.job_title,
JH.start_date,
JH.end_date
from employees E, job_history JH, jobs J
inner join departments D on E.employee_id = JH.employee_id
and D.department_id = JH.department_id
and J.job_id = JH.job_id
order by JH.start_date;
ORA-00904: "JH"." JOB_ID": invalid identifier 00904. 00000 - "%s: invalid Dentifier" *Cause:
*Action: Error on line: 18 Column: 114
puts the
job_history
andjobs
also in thejoin
– Rovann Linhalis
Syntax error, see how to do Inner Join with 3 tables or more.
– Renato Junior