在提出问题之前我已经搜索了该网站,但没有遇到相关的内容。我确信这是一个可笑的基本错误,我只从 0 计算机背景研究 Oracle SQL 大约 4 个月。我计划在本月底参加 1z0-051,因此请阅读所有章节。在这个条款中,我试图获取工资高于最低工资职位(CLERK)平均工资的员工的姓名、职务、工资、部门和城市。我不断收到缺少关键字?
SELECT e.first_name,
e.last_name,
j.job_title,
e.salary,
d.department_name,
l.city
FROM employees e
JOIN jobs j
WHERE salary >
(SELECT AVG(salary) FROM employees WHERE job_id LIKE '%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 BY salary