Open main menu

CDOT Wiki β

Changes

J.Y.S

657 bytes added, 15:52, 20 October 2010
6.
or department_id IS NULL)
order by hire_date desc;
</pre>
 
''FINAL''
<pre>
SELECT last_name, first_name, job_id, hire_date
FROM employees
WHERE hire_date >
(SELECT MAX(hire_date)
FROM employees
WHERE department_id =
(SELECT department_id
FROM departments
WHERE UPPER(department_name) = 'IT'))
AND (department_id !=
(SELECT department_id
FROM departments
WHERE UPPER(department_name) = 'EXECUTIVE')
OR department_id IS NULL)
ORDER BY hire_date DESC;
</pre>