Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Tricky One Display department id, department name, city and number of different jobs in each department. If city is null, you should print Not

5. Tricky One

Display department id, department name, city and number of different jobs in each department. If city is null, you should print Not Assigned Yet. This column should have alias City. Column that shows # of different jobs in a department should have the heading # of Jobs.

You should display ONE row per output line by limiting the width of the City to 25 characters.

You need to show complete situation from the department point of view,

meaning empty departments (without employees) and in no city located yet, but do NOT display free lancers (employees NOT working for any department) and do NOT display cities without departments.

You need to use Outer Joining with the NEW method.

But, firstly you will need to update a row in the DEPARTMENTS table like:

SQL> UPDATE departments

SET location_id = null

WHERE department_id = 110;

1 row updated.

Then after producing the output you will perform the Rollback.

SQL> ROLLBACK;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

Students also viewed these Databases questions

Question

=+4 How did it affect HR?

Answered: 1 week ago