Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the SQL code that would be needed to find the below (3 queries) 1. List the SSNO of employees who are also department managers.

image text in transcribedimage text in transcribed

Write the SQL code that would be needed to find the below (3 queries)

1. List the SSNO of employees who are also department managers.

-Demonstrate the use of INTERSECT operator in this query.

-Write the query without using the INTERSECT operator.

2. List the names of the dependents whose related employee works on the COMPUTERIZATION Project.

EMPLOYEE FIRST NAME MID INIT LAST NAME SSNO BDATE ADDRESS GENDER SALARY SUPSSNO DNO WAGNER 123456789 12/25/1978 731, FONDREN,AUSTIN, TX M PAUL 30000 666884444 FRANK T 5 55000 987987987 WONG 222556666 11/25/1978 638, VOSS, AUSTIN, TX JOYCE A 5 ENGLISH 453453453 10/25/1978 5631, RICE, ORLANDO, FL 50000 222556666 JANE B WEAVER 666884444 9/25/1978 975, FIREOAKHUMBLE,TX F 45000 222556666 JAMES E 777211234 8/25/1978 3321, CASTLE, SPRING, TX M 64000 1 GANNON JENIFFER s 987654321 7/25/1978 291, BERRY, CINCINNATI OH F 4 PROCAS 60000 77721 1234 AHMAD IV JABBAR 987987987 6/25/1978 980, CALHOUN, CINCINNATI, OH M 35000 4 ALICIA KEYS 123123123 5/25/1978 3321, CASTLE, CINCINNATI, OH F 64000 4 ORKS ON DEPARTMENT ESS NO PNO WORK HRS DEPT NAME DEPT NO MGRSSNO MGR START DATE 123456789 1 32.5 1777211234 HEADQUARTERS 6/19/91 123456789 2 7.5 1/1/89 4987654321 ADMINISTRATION 2225566661 2 10 5/22/93 PRODUCTION 5222556666 222556666 3 10 222556666 10 10 222556666 30 10 DEPARTMENT LOCATION LOCATION 453453453 1 20 DNUM DEPT LOCATION LOCATION STATE LOC SIZE 453453453 2 20 1 AUSTIN AUSTIN TX 200 666884444 3 40 4 CINCINNATI CINCINNATI OH 200 777211234 20 5 COLUMBUS 300 ORLANDO FL 9876543211 20 15 5 AUSTIN COLUMBUS OH 400 9876543 21 30 20 5 ORLANDO 35 987987987 10 987987987 30 5 DEPENDENT 123 123 123 10 10 ESSNO DEPENDENT NM DEP GENDER DEP BDATE RELATED HOW 123123123 30 25.5 123456789 ALICE 6/7/92 DAUGHTER F 123456789 ELIZABETH 5/5/67 SPOUSE IM 1/10/89 SON 123456789 MICHAEL 222556666 ALICE F 4/5/86 DAUGHTER 222556666 JOY 5/3/58 SPOUSE 123123123 THEODORE M 11/12/96 SON IM 987654321 BILL 2/29/60 SPOUSE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions