sql - Missing Keyword in JOIN syntax -
i have searched site before asking question havn't come across related. sure ridiculously basic error, have been studying oracle sql 0 computer background around 4 months. planning take 1z0-051 end of month going on chapters. in clause trying name, title, salary, department , city of employees have salary higher average salary of lowest paid position (clerk). keep getting missing keyword though?
select e.first_name, e.last_name, j.job_title, e.salary, d.department_name, l.city employees e join jobs j salary > (select avg(salary) employees job_id '%clerk%' ) on e.job_id = j.job_id join departments d on e.department_id = d.department_id join locations l on d.location_id = l.location_id order salary
you have join
-where
-on
sequence wrong.
should (assuming where
not part of joining condition):
from employees e join jobs j on e.job_id = j.job_id .... .... e.salary > (select avg(salary) employees job_id '%clerk%') order ...
Comments
Post a Comment