Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

There is 9 questions I need answer fot the whole 9 questions please! and thank y

ID: 3782905 • Letter: T

Question

There is 9 questions I need answer fot the whole 9 questions please! and thank you guys.

PROJECT Prame Fnumber Plocation num WORKS ON Essn Hours Figure 3.7 DEPENDENT Referential integrity constraints displayed Essn Dependent name l Sex Bdate l Relationship on the COMPANY relational database schem l. Retrieve the average salary, minimum and maximum salary of the male employees. 2. For each department, list its name along with its manager's first name and last name. 3. For each department, list its name, manager's first name and last name, and their dependents' names 4. Retrieve the number of employees of department 5 5. Retrieve the names of employees who work on the project "ProjectX 6. Retrieve the first name and last name of the male employee who has the highest salary 7. Retrieve the first names and last names of the employees who DONT have a dependent 8. For the department that controls the most number of projects, list its name 9. Retrieve the names and SSNs of employees who have at least two dependents.

Explanation / Answer

1. SELECT AVG(Salary) FROM EMPLOYEE WHERE Sex=M;

SELECT MIN(Salary) FROM EMPLOYEE WHERE Sex=M;

SELECT MAX(Salary) FROM EMPLOYEE WHERE Sex=M;

2. SELECT Dname, Fname, Lname
FROM EMPLOYEE
INNER JOIN DEPARTMENT

ON EMPLOYEE.Ssn=DEPARTMENT.Mger_ssn

3) SELECT Dname, Fname, Lname, Dependent_name

FROM EMPLOYEE
INNER JOIN DEPARTMENT

ON EMPLOYEE.Ssn=DEPARTMENT.Mger_ssn

INNER JOIN DEPENDENT;

ON EMPLOYEE.Ssn=DEPENDENT.Essn;

4) SELECT COUNT Dno FROM EMPLOYEE WHERE Dno=5;

5)

SELECT COUNT(Dnum)
FROM EMPLOYEE
INNER JOIN PROJECT

ON EMPLOYEE.Dno=PROJECT.Dnum;

WHERE Pname='ProductX'

(6)

SELECT Fname, Lname FROM EMPLOYEE WHERE

(7)

SELECT Fname, Lname

FROM EMPLOYEE
INNER JOIN DEPENDENT

ON EMPLOYEE.Ssn=DEPENDENT.Essn WHERE Dependent_name='NULL'

(8)

SELECT Dname FROM DEPARTMENT INNER JOIN PROJECT ON DEPARTMENT.Dnum=PROJECT.Dno WHERE COUNT(Pnum);

(9)

SELECT Dname

FROM EMPLOYEE
INNER JOIN DEPARTMENT

ON EMPLOYEE.Ssn=DEPARTMENT.Mger_ssn

INNER JOIN DEPENDENT;

ON EMPLOYEE.Ssn=DEPENDENT.Essn;

WHERE COUNT(Dependent_name)<=2;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote