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.
You are working on the new internal web system that requires that you use your expertise
search from the
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F03e1319b-66eb-4c56-b3db-4e821b9de936%2Fd06d2687-19bc-4929-92e8-b68d925443ac%2Fgjmhrm_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)