can you plaese answer the 9 questions sepdf edubbcswebdavpid

can you plaese answer the 9 questions!!

sepdf edu/bbcswebdav/pid-200426-dt-content-rid-1114367 1/courses/201710 IFSC 3330 01/SQLReviewExercise,pdf SQL Review Exercise Spring 2017 Given a company database schemas as below: EMPLOYEE Frame Minit Lname SBsn Bedate Address Sex Salary Super ssn T Dno DEPARTMENT Dname Dnumber T Mgr ssn T Mar start date DEPT LOCATIONS Dnumber Dlocation PROJECT Pname T number Plocation T Dnum WORKS ON Essn Hours Figure 37 DEPENDENT Referential integrity constraints displayed Essn Dependent name Sex Bdate Relationship on the COMPANY relational database schema. 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 Pg

Solution

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;

can you plaese answer the 9 questions!! sepdf edu/bbcswebdav/pid-200426-dt-content-rid-1114367 1/courses/201710 IFSC 3330 01/SQLReviewExercise,pdf SQL Review Ex

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site