Question: In the SQL server, the following tables have already been created: The first is a table called Dependents, and the second is called Employee. The

In the SQL server, the following tables have already been created: The first is a table called Dependents, and the second is called Employee. The primary key for Dependents is depEmpSSN, foreign key to Employee table, referencing empSSN.

In the SQL server, the following tables have already been created: The

I've been having a hard time formulating a query with the following question: Write a SELECT statement that returns the number of employees that do not have any dependents. Use an appropriate column alias name. The result set should have only 1 column and 1 row.

1 depGender F M 2 3 F F 4 5 F 6 M depEmp SSN dep Name 999111111 Deanna 999111111 Jeffery 999111111 Mary Ellen 999111111 Michelle 999111111 Rachael 999444444 Andrew 999444444 Jo Ellen 999444444 Susan 999555555 Allen 999666666 Anita 999666666 Mita 999666666 Monica 999666666 Rita dep Date Of Birth dep Relationship 1981-05-03 00:00:00.000 DAUGHTER 1978-12-31 00:00:00.000 SON 1956-05-28 00:00:00.000 SPOUSE 1984-03-17 00:00:00.000 DAUGHTER 1975-10-04 00:00:00.000 DAUGHTER 1998-10-25 00:00:00.000 SON 1996-04-05 00:00:00.000 DAUGHTER 1975-05-03 00:00:00.000 SPOUSE 1968-02-29 00:00:00.000 SPOUSE 1984-07-06 00:00:00.000 DAUGHTER 1956-06-04 00:00:00.000 SPOUSE 1988-12-30 00:00:00.000 DAUGHTER 1994-05-11 00:00:00.000 DAUGHTER 7 F 8 9 F M 10 F 11 F F 12 13 F 1 2 3 4 emp SSN 999111111 999222222 999333333 999444444 999555555 999666666 999887777 999888888 empLastName empFirst Name Bock Douglas Amin Hyder Joshi Dinesh Zhu Waiman Joyner Suzanne Bordoloi Bijoy Markis Marcia Prescott Shemi emp Middle Name empAddress B #2 Mont Verd Dr. NULL S. Seaside Apt. B NULL #10 Oak St. Z 303 Lindbergh 202 Bums Farm NULL South Main #12 M High St. #14 C Overton Way #4 emp City emp State St. Louis MO Marina CA Collinsville IL MO Marina CA Edward. IL Monterey CA Edward... IL St. Louis emp Zip empDate Of Birth emp Salary empParking Space empGender emp Dpt Number emp SuperSSN 63121 1950-12-05 00:00:00.000 30000.00 200 M 7 999444444 93941 1969-03-29 00:00:00.000 25000.00 422 M 3 999555555 66234 1972-09-15 00:00:00.000 38000.00 332 M 7 999444444 63121 1975-12-08 00:00:00.000 43000.00 32 M M 7 999666666 93941 1971-06-20 00:00:00.000 43000.00 3 F 3 999666666 62025 1954-03-14 00:00:00.000 55000.00 1 M 1 NULL 93940 1978-07-19 00:00:00.000 25000.00 402 F 3 999555555 62025 1972-07-31 00:00:00.000 25000.00 296 F 7 999444444 5 6 7 8

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!