1
edit
Changes
J.Y.S
,→8.
using (location_id)
group by department_id, department_name, city
</pre>
''YuJin''
<pre>
SELECT department_id, department_name,
SUBSTR(NVL(city, 'Not Assinged Yet'),1, 25) "City",
COUNT(DISTINCT job_id) "# of Jobs"
FROM employees
RIGHT OUTER JOIN departments USING (department_id)
LEFT OUTER JOIN locations USING (location_id)
GROUP BY department_id, department_name, city;
</pre>