Question: 2- Consider the following database. stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each

2- Consider the following database. stores data

2- Consider the following database. stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each employee works on each project. Relational diagram ASSIGNMENT na Malta XXI --- wb Description ibche. How ER IN tre LTY TEL BE 116 Table name: JOB -.ce COD JOB DESCRETION . CHO HOUR JO LAST UPDATE 500 Progner 3575 20. NOW.17 501 Syme A 96.75 20 NO.17 502 12500 24. so Bactrics Engineer 640 20. 904 Mathatats 6790 CM 5578 20..17 200 Clerical part 20- News 507 OSS Nyt 45.95 so Aan Dog 4010 500 20 NO.1 510 Geners Support Table name: EMPLOYEE BP NUM EMP LNAME EP FNAME EMP NTIAL BAP HREDATE JOB Code BMP YEARS 101 News John 08-Nov.00 502 17 102 Senior David 12-J-89 501 28 103 Abough June 01-Dec-96 500 PROCE 21 104 Romas Anne K 15.Nov.87 501 30 105 Johnson Alice 01-Feb.93 502 25 106 Smithfield Wilian 22-Jun-04 500 13 107 Alonzo Maris D 10-Oct-93 500 24 100 Washington Rap B 22-Aug-91 501 25 109 Smith w 18-Ju.97 501 110 Olenko Gerald A 11-Dec-95 505 22 Wabash Geott B 04-Asr-91 505 27 112 Smithson Darlene M 23 Oct. 94 507 113 Joenbrood Delbert K 15-Nov.96 508 110 Jones Annelige 20-Aug-83 508 115 Bawang Trave B 25 Jon 92 501 26 Pratt Gernid L 05 Mar.97 510 21 117 Wilson Ange H 19. un.96 509 21 110 Frommer James J 04-Jan-05 510 13 Table name: ASSIGNMENT ASSION NUMASOON DATE PROU NUDE MASSION 200 ASOGN OD RASOON HOURS ASSON CURDE 1001 22.1016 109 2210 22 117 42 100) 22-1010 117 509 2 60.1 1004 2.100 103 son 55 1005 22.18 25 100 22 21205 1006 22 Mr.18 22 104 500 0625 42 GO 100T 22.125 113 SCA 3079 1000 22.18 18 103 09 26.05 1000 23 Mr.18 15 115 501 55 6413 1010 25.Mar.10 15 909 24 1011 21.10 > 105 105 43 4515 1042 23-1010 100 501 06 3.4 1015 25.105 500 6675 2 35 1014 23.10 22 104 301 66 23 2900 016 23-1815 103 503 845 8.1 515.45 16 23.10 22 105 SOS 47 4905 101 S09 MS 28 13123 1010 112 3456 22 22 1019 20.105 104 501 1103 49 10:30 2.2.18 15 101 1021 26--18 22 501 22 1002 24.10 22 500 1105 48 4145 1023 2.18 22 105 35 45 1024 103 845 1005 26.3.10 10 Table name: PROJECT PROU_NUM PROV_NAME PROU_VALUE 15 Evergreen 14521500m 18 Amber Woo 350080000 22 Rolling Tide B05000.00 PROV_BALANCE EMP_NUM 1002850 OD 103 2110046 DO 108 500345 20 102 230900000107 Hos a) Write the SQL code that will list only the distinct project numbers in the ASSIGNMENT table, sorted by project number. b) Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should retrieve the assignment number, employee number, project number, the stored assignment charge (ASSIGN_CHARGE), and the calculated assignment charge (calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS). Sort the results by the assignment number. c) 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!