Problem 6 Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked fo

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem 6 Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours worked fo

Post by answerhappygod »

Problem 6 Using The Data In The Assignment Table Write The Sql Code That Will Yield The Total Number Of Hours Worked Fo 1
Problem 6 Using The Data In The Assignment Table Write The Sql Code That Will Yield The Total Number Of Hours Worked Fo 1 (78.74 KiB) Viewed 26 times
Problem 6 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, sorted by employee number. The results of running that query are shown in Figure P7.6. EMP_NUM 101 103 104 105 108 113 115 117 EMP_LNAME News Arbough Ramoras Johnson Washington Joenbrood Bawangi Williamson SumOfASSIGN_HOURS 3.1 19.7 11.9 12.5 8.3 3.8 12.5 18.8 SumOfASSIGN_CHARGE 387.50 1664.65 1218.70 1382.50 840.15 192.85 1276.75 649.54
query.sql 1 SELECT A. EMP_NUM, E.EMP_LNAME, ROUND (SUM(A. ASSIGN_HOURS),1) AS SumOf A ROUND (SUM(A. ASSIGN_CHARGE), 1) AS SumOf Assign_charge 2 3 FROM EMPLOYEE E, ASSIGNMENT A 4 5 WHERE E.EMP_NUM= A. EMP_NUM 6 7 GROUP BY A. EMP_NUM, E.EMP_LNAME 8 9 ORDER BY A.EMP_NUM; 10 SQL Viewer EMP_NUM 101 103 104 105 108 113 115 EMP_LNAME News Arbough Ramoras Johnson Washington Joenbrood Bawangi SumOfAssign_Hours 3.1 19.7 11.9 12.5 8.3 3.8 12.5 SumOfAssign_charge 387.5 1664.7 1218.7 1382.5 840.2 192.9 1276.8 Run query (Ctrl+E nter)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply