Question: Write the following queries in SQL select statements. a) For each department, retrieve the departments name, the department managers name, the departments locations, and the

Write the following queries in SQL select statements.

a) For each department, retrieve the departments name, the department managers name, the departments locations, and the names of the projects controlled by the department.

b) Retrieve the number and name of each department that controls at least one project that is in the same location (Plocation) as the departments location (Dlocation). Write this query without using a quantifier, i.e., write using only joins.

c) Retrieve the number and name of each department that does not control any project that is in the same location (Plocation) as the departments location (Dlocation).

Write the following queries in SQL select statements. a) For each department,

Figure 5.7 Referential integrity constraints displayed on the COMPANY relational database schema EMPLOYEE Fname |Minit Lname SenBdate Address S ex SalarySuper ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr start date DEPT LOCATIONS Dnumber Dlocation PROJECT Pname Pumber Plocation Dnum WORKS ON Essn Po Hours DEPENDENT Essn Dependent name Sex BdateRelationship

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!