TA 07 pt 2 - those hours worked. The results of running...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 7 (pages 253-275) Problems: 16. Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database, write the SQL code that will produce the results shown in Figure P7.16. SELECT PROJ_NAME, PROJ_VALUE, PROJ_BALANCE, EMP_LNAME, EMP_FNAME, EMP_INITIAL, JOB_CODE, JOB_DESCRIPTION, JOB_CHG_HOUR FROM EMPLOYEE, JOB, PROJECT 21. Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. NOTE: ASSIGN_CHARGE is derived from ASSIGN_CHG_HR x ASSIGN_HOURS. SELECT SUM(ASSIGN_CHG_HR * ASSIGN_HOURS) FROM ASSIGNMENT GROUP BY ASSIGN_CHARGE 22. Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked for each employee and the total charges stemming from
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: those hours worked. The results of running that query are shown in Figure P7.22. SELECT SUM(ASSIGN_HOURS), SUM(ASSIGN_CHARGE), EMP_LNAME, EMP_NUM FROM ASSIGNMENT ORDER BY EMP_LNAME 23. Write a query to produce the total number of hours and charges for each of the projects represented in the ASSIGNMENT table. The output is shown in Figure P7.23. SELECT SUM(ASSIGN_HOURS), SUM(ASSIGN_CHARGE), PROJ_NUM FROM ASSIGNMENT ORDER BY PROJ_NUM 24. Write the SQL code to generate the total hours worked and the total charged made by all employees. The results are shown in Figure P7.24. SELECT SUM(ASSIGN_HOURS), SUM(ASSIGN_CHARGE) FROM ASSIGNMENT...
View Full Document

This note was uploaded on 07/13/2011 for the course IST 210 taught by Professor Mcconn,charlotteryoo,jungwoo during the Summer '08 term at Pennsylvania State University, University Park.

Ask a homework question - tutors are online