Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer 15,16,17,18,19,20,21,22,23 15. Write the SQL code required to list all employees whose last names start with Smith. In other words, the rows for both

Answer 15,16,17,18,19,20,21,22,23

15. Write the SQL code required to list all employees whose last names start with Smith. In other words, the rows for both Smith and Smithfield should be included in the listing. Assume case sensitivity.

16. Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database (see Figure P7.1), write the SQL code that will produce the results shown in

17. Write the SQL code that will produce the same information that was shown in Problem 16, but sorted by the employees last name. 18. Write the SQL code to find the average bonus percentage in the EMP_2 table you created in Problem 8. 19. Write the SQL code that will produce a listing for the data in the EMP_2 table in ascending order by the bonus percentage.

20. Write the SQL code that will list only the distinct project numbers in the EMP_2 table. 21. Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN_ CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.

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 those hours worked. The results of running that query are shown in Figure

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

image text in transcribed

15. Write the SQL code required to list all employees whose last names start with Smith In other words, the rows for both Smith and Smithfield should be included in the listing. Assume case sensitivity. 16. Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo data- base (see Figure P7.1), write the SQL code that will produce the results shown in Figure P7.16 FIGURE P7.16 THE QUERY RESULTS FOR PROBLEM 16 PROJ NAME PROJ VALUE PROJ BALANCE EMP LNAME EMP Rolling Tide Evergreen Starflight 805000.00 1453500.00 1002350.00 Arbough June 3500500.00 EMP NITIAL JOB CODE JOB DESCRIPTIONJOe_CHG HOUR 96.75 35.75 35.75 96.75 500345.20 Senior David 501 500 500 501 Systems Analyst Programmer Programmer Systems Analyst 2309880.00 AlonzO Maria 2110346.00 Washington Ralph Amber Wave2650500.00 17. Write the SQL code that will produce the same information that was shown in Prob- 18. Write the SQL code to find the average bonus percentage in the EMP_2 table you 19. Write the SQL code that will produce a listing for the data in the EMP_2 table in 20. Write the SQL code that will list only the distinct project numbers in the EMP_2 lem 16, but sorted by the employee's last name created in Problem 8. ascending order by the bonus percentage table. 21. Write the SQL code to calculate the ASSIGN CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN HOURS 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 those hours worked. The results of running that query are shown in Figure P7.22

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions