Question: sql homework please help Use the Dependent table in the Company database to answer the following questions: 1. List the Employee SSN (ESSN) and number
sql homework please help 

Use the Dependent table in the Company database to answer the following questions: 1. List the Employee SSN (ESSN) and number of dependents for each employee. 2. list the Employee SSN (ESSN) and number of dependents for each employee but only list employees who have at least two dependents. 3. List the Employee SSN (ESSN), Sex, and number of dependents of that sex for each employee. Sort your list by Employee SSN Use the Employee table in the Company database to answer the following questions: 4. What is the number of employees, number of unique salary values, total salary, and average salary for all employees? Use appropriate column headings for all calculated values. 5. What is the number of employees, number of unique salary values, total salary, and average salary broken down by Department? Only show departments that have at least two employees. Normal No Spacing Heading 2. A Employee SSN FNAME M LNAME BDATE ADDRESS 888665555 James E Borg 10-NOV-92 450 Stone, Houston, TX 333445555 Franklin T Wong 08-DEC-70 638 Voss, Houston, TX 987654321 Jennifer S Wallace 20-JUN-86 291 Berry, Bellaire, TX 987987987 George W Bush 29-MAR-84 980 Dallas, Houston, TX 123456789 John B Smith 09-JAN-80 731 Fondren, Houston, TX 999887777 Alicia u Zelaya 19-JUL-83 3321 Castle, Spring, TX 666884444 Ramesh K Narayan 15-SEP-77 975 Fire Oak, Humble, TX 453453453 Joyce A English 31-JUL-87 5631 Rice, Houston, TX Sex SALARY SUPERSSN DNUMBER M 55000 1 M 40000 888665555 5 F 43000 888665555 4 M 25000 987654321 4 M 30000 333445555 5 F 25000 987654321 4 F 38000 333445555 5 F 25000 333445555 5 6 Department DNUMBER DNAME MGRSSN MGRSTARTDATE 5 Research 333445555 22-MAY-2003 4 Administration 987654321 01-JAN-2006 1 Headquarters 888665555 19-JUN-96 Dept Locations DNUMBER DLOCATION 1 Houston 4 Stafford 5 Bellaire 5 Sugarland 5 Houston Project PNUMBER PNAME PLOCATION NUMBER 1 ProductX Bellaire 5 2 Project Sugarland 5 3 Product Houston 5 10 Computerization Stafford 20 Reorganization Houston 1 30 Newbenefits Stafford 4 4 Works On SSN PNUMBER HOURS 123456789 1 32.5 123456789 2 7.5 666884444 3 40 453453453 1 20 453453453 2 20 333445555 2 10 333445555 3 10 333445565 10 10 333445555 20 10 999887777 30 30 999887777 10 10 Dependent ESSN DEPENDENT NAME Sex BDATE RELATIONSHIP 333445555 Alice F 05-APR-2001 Daughter 333445555 Theodore M 25-OCT-2014 Son 333445555 Joy F 03-MAY-1983 Spouse 987654321 Abner M 28-FEB-1987 Spouse 2/Midh JAN.on English (United States OLLAGE Normal NO Spacing lili 100 ilil III 1 Headquarters 888665555 19-JUN-96 4 Stafford 5 Bellaire 5 Sugarland 5 Houston Project PNUMBER PNAME PLOCATION DNUMBER 1 Product Beliaire 5 2 Proiect Sugarland 5 3 Productz Houston 5 10 Computerization Stafford 4 20 Reorganization Houston 1 30 Newbenefits Stafford 4 NN Dependent ESSN DEPENDENT NAME Sex BDATE RELATIONSHIP 333445555 Alice F 05-APR-2001 Daughter 333445555 Theodore M 25-OCT-2014 Son 333445555 Joy F 03-MAY-1983 Spouse 987654321 Abner M 28-FEB-1987 Spouse 123456789 Michael M 01-JAN-2013 Son 123456789 Alice F 31-DEC-2013 Daughter 123456789 Elizabeth F 05-MAY-1992 Spouse Works On SSN PNUMBER HOURS 123456789 1 32.5 123456789 2 7.5 666884444 3 40 453453453 1 20 453453453 20 333445555 10 333445555 3 10 333445555 10 10 333445555 20 10 999887777 30 30 999887777 10 10 987987987 10 35 987987987 ko 5 987654321 30 20 087654321 20 15 888005555 20 Nul
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
