(11) Retrieve the average salary of department 5 employees. (12) List the last n
ID: 3587020 • Letter: #
Question
(11) Retrieve the average salary of department 5 employees.
(12) List the last names of department managers who have dependents.
EMPLOYEE FNAME MINIT LNAME SSN SEX SALARYSUPERSSN DNO Smith 123456789 1965-01-09 333445555 1955-12-08 999887777 1968-07-19 Wallace 9876543211941-06-20 Narayan666884444 1962-09-15 453453453 1972-07-31 987987987 1969-03-29 888665555 1937-11-10 638 Voss, Houston, TX 975 Fire Oak, Humble, TXM 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX Jabbar E Borg DEPT LOCATIONS DEPARTMENT DNAME DNUMBER MGRSSN MGRSTARTDATE 1995-01-01 1981-06-19 Headquarters WORKS_ON ESSN PNO HOURS PROJECT PNAME PNUMBER PLOCATION DNUM Bellaire 5 and 3 20 987654321 DEPENDENT ESSN DEPENDENT NAME SEX RELATIONSHIP 1983-10-25 F 195805-03 1942-02-28 1988-01-04 1988-12-30 1967-05-05 123456789 DAUGHTER SPOUSEExplanation / Answer
11) select avg(SALARY) from EMPLOYEE where DNO=5;
12) select LNAME from EMPLOYEE as E where (select * from DEPENDENT as D where E.SSN=D.ESSN);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.