Open main menu

CDOT Wiki β

Changes

J.Y.S

298 bytes added, 22:51, 19 October 2010
8.
''Saad''
<pre>
SELECT department_id, department_name, SUBSTR(NVL(city,'Not Assigned Yet'),1,25) City,
COUNT(DISTINCT job_id) "# of Jobs"
FROM locations l RIGHT OUTER JOIN departments d
USING (location_id)
LEFT OUTER JOIN employees e
USING (department_id)
GROUP BY department_id, department_name, city
/
</pre>
''James''
<pre>
</pre>
1
edit