The exercises below is using the database from Assignment 2.

Create a file to record SQL queries, results and explanations on following questions.

  • List all project names and manager names in charge projects.
  • Calculate total hours to all projects based on each employee.
  • Suppose there are 408 work hours per year, create a view to display employee hourly rate.
  • Find out the total labor cost per employee, per project.
  • Alter the table employees and add column to store date of birth and hire date. Update the table with the provided data.
  • Create a new table named emp_proj_overtime which have three columns of

EMP_PROJ_OVERTIME (empNo, projNo) Details of the hours worked by the employee on each project
empNo Unique id, format 9999
projNo Unique id, format 9999
hourOt Number of overtime hours spent by the employee in the project

  • Assume each employee has a cap of 100 hours per project, develop a trigger to track overtime hours when employee exceed the cap for the project.
  • If the overtime pay is twice of regular hourly rate, modify the query from question 4 and add the factor of overtime.

Employee Data

empNo DOB Hire_date
1000 04/30/1995 05/01/2010
1007 12/31/1986 01/02/2018
2002 07/12/1964 10/15/2014
1760 02/28/1976 06/15/2009
1740 09/10/1990 09/02/2011
2060 06/25/1980 04/01/2013
2000 05/05/1999 08/01/2019
1444 01/24/1993 07/15/2012

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.