Open main menu

CDOT Wiki β

Changes

J.Y.S

344 bytes added, 16:09, 20 October 2010
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>