You are working on the new internal web system that requires that you use your expertise search from the database to provide adequate feedback to your supervisor. The company has centralized database which lets you organise and manage all the employee data from a single point. With this finest employee database, the end user can easily track the Projects, Leaves, Attendances, Timesheets, Salaries, Expenses, and more from employee. Keep the log of employee lifecycle and examine the improvements in your workforce over the period with this employee database management system. Use the Company_XYZ database to write the SQL queries that solve the questions below.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You are working on the new internal web system that requires that you use your expertise
search from the database to provide adequate feedback to your supervisor. The company has
centralized database which lets you organise and manage all the employee data from a single
point. With this finest employee database, the end user can easily track the Projects, Leaves,
Attendances, Timesheets, Salaries, Expenses, and more from employee. Keep the log of
employee lifecycle and examine the improvements in your workforce over the period with this
employee database management system. Use the Company_XYZ database to write the SQL
queries that solve the questions below.

 

1.1. Perform an SQL request to search in the database for full name of each employee who
works on all the projects controlled by department number 4 together with their
depended, ordered by the first names. [4]
1.2. Perform an SQL request to search in the database for each department that has more
than five employees, search for department number, working hours and the number of
its employees who are earning at least R40,000 and ordered by last name. [4]
1.3. Perform an SQL query request to search in the database to retrieve the sum of the
salaries of all employees of the Research and Administration department, as well as
the maximum salary, the minim salary, and the average salary in this department. [4]

1.4. Perform an SQL request to search in the database to find a list of employees and the
projects they are working on, ordered by department and, within each department,
ordered alphabetically by last name, first name [4]
1.5. Perform an SQL query request to search in the database to make a list of project
numbers for projects that involve an employee whose last name is Narayan, either as
a worker or as a manager of the department that controls the project and ordered by
project number.

ΕMPLOYEΕ
Fname
Minit
Lлame
Ssn
Bdate
Address
Sex Salary
Super_san
30000 333445005
M 40000 B88665000
F 20000 987654321
Dno
B
123456789 1965-01-09 731 Fondren, Houston, TX M
333445000 1955-12-08 638 Voss, Houston, TX
999887777 1968-01-19 3321 Castle, Spring, TX
Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX
Narayan 666884444 1962-09-15975 Fire Oak, Humble, TX M 38000 333445005
English 453433453 1972-07-31 D631 Rice, Houston, TX F 20000 333445005
John
Smith
Franklin
Wong
5
Alicia
Zelaya
4
Jennifer
F
43000 888665555
4
Ramesh
K
Joyce
A
Ahmad
V
Jabbar
987987987 1969-03-29 980 Dallas, Houston, TX M 20000 987654321
4
James
E
Вorg
888665500 1937-11-10 450 Stone, Houston, TX
M 0o000 NULL
DEPARTMENT
DEPT LOCATIONS
Dname
Dnumber
Mgr san
Mgr_start_date
Dnumber
Dlocation
Research
33344DD00
1988-05-22
Houston
Administration
4
987654321
1995-01-01
4
Stafford
Headquarters
888660005
1981-06-19
Bellaire
Sugarland
Houston
WORKS ON
PROJECT
Esan
Pno
Hours
Pname
Pnumber
Plocation
Dnum
123406789
32.0
ProductX
Bellaire
123406789
7.0
ProductY
Sugarland
666884444
40.0
Productz
3
Houston
Computerization
Reorganization
453403453
20.0
10
Stafford
4
453403453
20.0
20
Houston
333445005
10.0
Newbenetits
30
Stafford
4
333445000
10.0
333445555
10
10.0
DEPENDENT
333445555
20
10.0
Essn
Dependent_name
Ser
Bdate
Relationship
999887777
30
30.0
333440000
Alice
F
1986-04-05
Daughter
999887777
10
10.0
333440055
Theodore
M
1983-10-25
Son
987987987
10
35.0
333445055
Joy
F
1958-00-03
Spouse
987987987
Spouse
30
0.0
987604321
Abner
M
1942-02-28
987654321
30
20.0
123456789
Michael
M
1988-01-04
Son
987654321
20
15.0
123456789
Alice
1988-12-30
Daughter
BBB665500
20
NULL
123456789
Elizabeth
F
1967-05-00
Spouse
Transcribed Image Text:ΕMPLOYEΕ Fname Minit Lлame Ssn Bdate Address Sex Salary Super_san 30000 333445005 M 40000 B88665000 F 20000 987654321 Dno B 123456789 1965-01-09 731 Fondren, Houston, TX M 333445000 1955-12-08 638 Voss, Houston, TX 999887777 1968-01-19 3321 Castle, Spring, TX Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX Narayan 666884444 1962-09-15975 Fire Oak, Humble, TX M 38000 333445005 English 453433453 1972-07-31 D631 Rice, Houston, TX F 20000 333445005 John Smith Franklin Wong 5 Alicia Zelaya 4 Jennifer F 43000 888665555 4 Ramesh K Joyce A Ahmad V Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 20000 987654321 4 James E Вorg 888665500 1937-11-10 450 Stone, Houston, TX M 0o000 NULL DEPARTMENT DEPT LOCATIONS Dname Dnumber Mgr san Mgr_start_date Dnumber Dlocation Research 33344DD00 1988-05-22 Houston Administration 4 987654321 1995-01-01 4 Stafford Headquarters 888660005 1981-06-19 Bellaire Sugarland Houston WORKS ON PROJECT Esan Pno Hours Pname Pnumber Plocation Dnum 123406789 32.0 ProductX Bellaire 123406789 7.0 ProductY Sugarland 666884444 40.0 Productz 3 Houston Computerization Reorganization 453403453 20.0 10 Stafford 4 453403453 20.0 20 Houston 333445005 10.0 Newbenetits 30 Stafford 4 333445000 10.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent_name Ser Bdate Relationship 999887777 30 30.0 333440000 Alice F 1986-04-05 Daughter 999887777 10 10.0 333440055 Theodore M 1983-10-25 Son 987987987 10 35.0 333445055 Joy F 1958-00-03 Spouse 987987987 Spouse 30 0.0 987604321 Abner M 1942-02-28 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice 1988-12-30 Daughter BBB665500 20 NULL 123456789 Elizabeth F 1967-05-00 Spouse
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY