![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![Given the following Staff2 table, please write a SQL statement to find the superno who supervised 4 or more staff.
The superno is the supervisor's staffno.
staffno fname Iname position
ABC1 New Engineer Intern
CC1 Super User DBA
SA9 Mary Howe
SG14 David Ford
SG37 Ann Beech
SG5 Susan Brand
SL21 John White
SL41 Julie Lee
XY1 New Tester
Forth
sex DOB
M
M
Assistant F
Supervisor M
Assistant F
Manager F
Manager M
Assistant F
Assistant M
salary branchno superno
1/1/2000 9000 B002
SL21
1/1/1995 90000 B005
SG14
2/19/1970
9000 B007
SG5
3/24/1958 18000 B003
SG5
11/10/1960
12000 B003
SG5
6/3/1940 24000 B003
SL21
10/1/1945 30000 B005
NULL
6/13/1965
9000 B005
SL21
1/1/1990 8000 B002
SL21](https://content.bartleby.com/qna-images/question/2ec814c7-90f3-4435-9bb8-fcbab3f733ac/5334c6c2-175c-4db7-9da0-26f7a32024ee/5urudpb_thumbnail.png)
Transcribed Image Text:Given the following Staff2 table, please write a SQL statement to find the superno who supervised 4 or more staff.
The superno is the supervisor's staffno.
staffno fname Iname position
ABC1 New Engineer Intern
CC1 Super User DBA
SA9 Mary Howe
SG14 David Ford
SG37 Ann Beech
SG5 Susan Brand
SL21 John White
SL41 Julie Lee
XY1 New Tester
Forth
sex DOB
M
M
Assistant F
Supervisor M
Assistant F
Manager F
Manager M
Assistant F
Assistant M
salary branchno superno
1/1/2000 9000 B002
SL21
1/1/1995 90000 B005
SG14
2/19/1970
9000 B007
SG5
3/24/1958 18000 B003
SG5
11/10/1960
12000 B003
SG5
6/3/1940 24000 B003
SL21
10/1/1945 30000 B005
NULL
6/13/1965
9000 B005
SL21
1/1/1990 8000 B002
SL21
Expert Solution
![Check Mark](/static/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
![Blurred answer](/static/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- write SQL statement to search for employees who is the manager of the department specified by the cboDeptarrow_forwardI need help with the SQL query for the following question: 1. Get a list of 5 reviews for shoppers in Chicago Here is the information on the field names: The table name is: Reviews Review Form Fields Product/ModelName: Product/Category: Product/Price: Retailer/Name: Retailer/ZipCode: Retailer/City: Retailer/State: Product/On Sale: Manufacturer/Name: Manufacturer/Rebate: Review/UserId: Review/Rating: Review/Date: Review/Text: Example of Review Form Filled out ProductModelName: Galaxy S4 ProductCategory: Smart Phone ProductPrice: 499 RetailerName: Bestbuy RetailerZipCode: 44114 RetailerCity: Cleveland RetailerState: OH ProductOnSale: No ManufacturerName: Samsung ManufacturerRebate: No ReviewUserId: xmm473 ReviewRating: 3 ReviewDate: 6/10/2012 ReviewText: overheats after 2 hoursarrow_forwardwrite SQL statement to search for employees whose manager is specified by the txtEname boxarrow_forward
- Write a SQL statement to create a table job_history including columns employee_id, start_date, end_date, job_id and department_id and make sure that, the employee_id column does not contain any duplicate value at the time of insertion and the foreign key column job_id contain only those values which are exists in the jobs table. Field EMPLOYEE_ID START_DATE END DATE JOB_ID DEPARTMENT_ID Type Decimal(6,0) Date Date Varchar(10) Decimal(4,0) Null No No No No Yes Key pk fk Default Extra Null Null Null Null Nullarrow_forwardBased on SQL informationarrow_forwardFor below DEPARTMENT table write a SQL query so that repeated group names are shown with quotation symbol like in above desired output For understanding logic, can you give simple example in Microsoft SQL Server Management Studio 18. Thank you.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education