Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write SQL query - based on the single-company database - For every dependent, find, and output, the dependent, the number of siblings (brothers and sisters)
Write SQL query - based on the single-company database - "For every dependent, find, and output, the dependent, the number of siblings (brothers and sisters) of the dependent who are also dependents, and the first, middle, and last name of the employee whose dependents they all are."
EMPLOYEE WORKS ON FNAME MINIT LNAME B T J S K A V E DEPENDENT John Franklin Alicia Jennifer Ramesh DEPARTMENT Joyce Ahmad James DNAME Research SSN 123456789 333445555 999887777 Smith Wong Zelaya Wallace 987654321 666884444 453453453 987987987 888665555 ESSN 123456789 123456789 666884444 453453453 453453453 333445555 333445555 333445555 333445555 999887777 999887777 987987987 987987987 987654321 987654321 888665555 Administration Headquarters ESSN 333445555 333445555 333445555 987654321 123456789 123456789 123456789 Narayan English Jabbar Borg PNO HOURS 1 32.5. 2 7.5 3 40.0 1 20.0 2 20.0 2 10.0 3 10.0 10.0 10.0 30.0 10.0 35.0 5.0 20.0 15.0 null 10 20 30 10 10 30 30 20 20 DNUMBER MGRSSN 5 4 1 BDATE 1965-01-09 1955-12-08 1968-07-19 1941-06-20 1962-09-15 1972-07-31 1969-03-29 1937-11-10 Alice Theodore Joy Abner Michael Alice Elizabeth 333445555 987654321 888665555 PROJECT DEPENDENT NAME SEX F M F M M F F ADDRESS 731 Fondren, Houston, TX 638 Voss, Houston, TX 3321 Castle, Spring, TX 291 Berry, Bellaire, TX 975 Fire Oak, Humble, TX 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX MGRSTARTDATE 1988-05-22 1995-01-01 1981-06-19 BDATE 1986-04-05 1983-10-25 1958-05-03 DEPT_LOCATIONS 1942-02-28 1988-01-04 1988-12-30 1967-05-05 PNAME ProductX ProductY ProductZ Computerization Reorganization Newbenefits RELATIONSHIP DAUGHTER SON SPOUSE SPOUSE SON DAUGHTER SPOUSE SEX SALARY M 30000 40000 M F 25000 F 43000 38000 M 25000 F M 25000 M 55000 DNUMBER 1 4 5 5 5 SUPERSSN 333445555 888665555 987654321 888665555 333445555 333445555 987654321 null DLOCATION Houston Stafford Beilaire Sugarland Houston PNUMBER PLOCATION 1 2 3 10 20 30 Bellaire Sugarland Houston Stafford Houston Stafford DNUM 5 5 5 4 1 4 DNO 5 5 4 4 5 5 4 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started