Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

From the schema, express the following query in SQL., include the query text and output. Produce a table showing the social security number of the

From the schema, express the following query in SQL., include the query text and output.

Produce a table showing the social security number of the supervisor and the number of employees supervised by this supervisor, sorted by the number of employees in ascending order.

image text in transcribed

One possible database state for the COMPANY relational database schema EMPLOYEE Fname MinitLn ame Bdate Address ex Salary Super ssn Dno B Smith123456789 1965-01-09 731 Fondren, Houston, Tx M 30000 3334455555 M 40000 8886655555 Franklin T Wong 333445555 1955-12-08 638 Voss, Houston, TX J Zelaya 999887777 1968-01-19 3321 Castle, Sprina. TXF25000 987654321 Jennifer SWallace 987654321 1941-06-20 291 Berry, Bellaire, TX Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 3334455555 F 43000 8886655554 A English 453453453 1972-07-31 5631 Rice, Houston, TX F 25000 3334455555 Joyce AhmadVJabbar 9879879871969-03-29980 Dallas, Houston, TXM 25000 9876543214 James 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL DEPARTMENT DEPT_LOCATIONS Dnumber Dlocation Dnumber Mgr ssn 333445555 987654321 888665555 Dname Houstorn Research Administration Headquarters 1988-05-22 1995-01-01 1981-06-19 5 Bellaire 5 ugarlain Houston WORKS ON PROJECT Pname Pnumber Plocation Essn 123456789 123456789 666884444 453453453 453453453 333445555 333445555 333445555 333445555 999887777 999887777 987987987 987987987 987654321 987654321 888665555 Hours Ununm Bellaire Sugarland Houston 32.5 ProductY Productz Computerization Reorganizatiorn Newbenefits 3 3 5 Houston 3 DEPENDENT Dependent name Sex Alice Theodore Relationship Essn 333445555 333445555 333445555 987654321 123456789 1 23456789 123456789 1986-04-05 Daughter M1983-10-25 Son 1958-05-03 Spouse 1942-02-28 Spouse 35.0 Abner Michael Alice M1988-01-04Son 1988-12-30Daughter 1967-05-05Spouse NULL

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago