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.
Step by step
Solved in 4 steps