Question: Write the following SQL query: List the fname, lname for employees who have more than the average number of dependents. Compute the average number of

Write the following SQL query: List the fname, lname for employees who have more than the average number of dependents. Compute the average number of dependents over ALL employees, not just those with dependents.

The database is as follows:

Write the following SQL query: List the fname, lname for employees who

EMPLOYEE | FNAME | MINIT |LNAME | SSN SEX SALARY | SUPERSSN DNO Smith 123456789 1965-01-09 333445555 638 Voss, Houston, TX 987654321 Wallace 9876543211941-06-20 975 Fire Oak, Humble, TX 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX Narayan 453453453 1972-07-31 987987987 1969-03-29 333445555 Jabbar 987654321 Borg DEPT LOCATIONS DNAME Research DNUMBER MGRSSN MGRSTARTDATE 1988-05-22 995-01-01 1981-06-19 DEPARTMENT Headquarters WORKS ON ESSNPNO HOURS 123456789 53453453 PROJECT PNAME PNUMBER PLOCATION DNUM 987987987 987987987 ESSN I DEPENDENT NAME SEX BDATE RELATIONSHIP Theodore 1983-10-25 1958-05-03 1942-02-28 1988-01-04 SPOUSE EMPLOYEE | FNAME | MINIT |LNAME | SSN SEX SALARY | SUPERSSN DNO Smith 123456789 1965-01-09 333445555 638 Voss, Houston, TX 987654321 Wallace 9876543211941-06-20 975 Fire Oak, Humble, TX 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX Narayan 453453453 1972-07-31 987987987 1969-03-29 333445555 Jabbar 987654321 Borg DEPT LOCATIONS DNAME Research DNUMBER MGRSSN MGRSTARTDATE 1988-05-22 995-01-01 1981-06-19 DEPARTMENT Headquarters WORKS ON ESSNPNO HOURS 123456789 53453453 PROJECT PNAME PNUMBER PLOCATION DNUM 987987987 987987987 ESSN I DEPENDENT NAME SEX BDATE RELATIONSHIP Theodore 1983-10-25 1958-05-03 1942-02-28 1988-01-04 SPOUSE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!