1
edit
Changes
J.Y.S
,→4.
and salary < (select max(salary)
from employees
where substr(job_id,4)) not in ('PRES','VP','MAN','MGR'))order by employee"Employee";</pre> ''YuJin''<pre>SELECT SUBSTR(first_name ||' '|| last_name, 1, 25) "Employee", job_id, LPAD(TO_CHAR(salary, 'fm$999,999'), 12, '=') "Salary", department_nameFROM employees e JOIN departments dON (e.department_id = d.department_id)WHERE UPPER(department_name) IN ('MARKETING', 'SALES')AND salary < (SELECT MAX(salary) FROM employees WHERE SUBSTR(UPPER(job_id), 4) NOT IN ('PRES','VP','MAN','MGR'))ORDER BY 1;
</pre>