Write the SQL code that will produce the results shown as below. Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table. Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS. 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 result is shown as below.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
  1. Write the SQL code that will produce the results shown as below.
  2. Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table. Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.
  3. 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 result is shown as below.
Ship & Sketch
O New
A New
Table: JOB
Database Structure
Browse Data
Execute SQL
Edit Pragmas
JOB_CODE JOB_DESCRIPTION
JOB_CHG_HOUR JOB_LAST_UPDATE
Table:
ΕMPLOYEΕ
be Filter in any column
Table:
ASSIGNMENT
a Filter in any column
Filter
Filter
Filter
Filter
EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL
EMP_HIREDATE JOB_CODE EMP_YEARS
ASSIGN_NUM ASSIGN_DATE PROJ_NUM EMP_NUM ASSIGN_JOB
ASSIGN_CHG_HR ASSIGN_HOURS
ASSIGN_CHARGE
1
500
Programmer
35.75
11/20/2013
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
Filter
2.
501
Systems Analyst
96.75
11/20/2013
1
1001
3/22/2014 18
103
503
84.5
3.5
295.75
1.
101
News
John
G
11/8/2000 502
4
3
502
Database Designer
125.0
3/24/2014
2
1002
3/22/2014 22
117
509
34.55
4.2
145.11
2 102
Senior
David
H
7/12/1989 501
15
4
503
Electrical Engineer
84.5
11/20/2013
3
1003
3/22/2014 18
117
509
34.55
2.0
69.1
3
103
Arbough
June
12/1/1996 503
8
4
1004
3/22/2014 18
103
503
84.5
5.9
498.55
504
Mechanical Engineer 67.9
11/20/2013
4
104
Ramoras
Anne
11/15/1987 501
17
5
1005
3/22/2014 25
108
501
96.75
2.2
212.85
6.
505
Civil Engineer
55.78
11/20/2013
105
Johnson
Alice
K
2/1/1993 502
12
6
1006
3/22/2014 22
104
501
96.75
4.2
406.35
Clerical Support
11/20/2014
7
506
26.87
6
106
Smithfield
William
6/22/2004 500
1007
3/22/2014 25
113
508
50.75
3.8
192.85
8
507
DSS Analyst
45.95
11/20/2013
8
1008
3/22/2014 18
103
503
84.5
0.9
76.05
7 107
Alonzo
Maria
10/10/1993 500
11
508
Applications Designer 48.1
3/24/2014
9
1009
3/23/2014 15
115
501
96.75
5.6
541.8
8
108
Washington Ralph
B
8/22/1991 501
13
10 509
Bio Technician
34.55
11/20/2013
10
1010
3/23/2014 15
117
509
34.55
2.4
82.92
9
109
Smith
Larry
W
7/18/1997 501
7
1011
3/23/2014 25
11 510
General Support
18.36
11/20/2013
11
105
502
105.0
4.3
451.5
10 110
Olenko
Gerald
A
12/11/1995 505
12
1012
3/23/2014 18
108
501
96.75
3.4
328.95
11 111
Wabash
Geoff
B
4/4/1991 506
14
13
1013
3/23/2014 25
115
501
96.75
2.0
193.5
Snip & Sketch
Smithson
Darlene
10/23/1994 507
12 112
M
10
14
1014
3/23/2014 22
104
501
96.75
2.8
270.9
1015
3/23/2014 15
515.45
13 113
Joenbrood
Delbert
K
11/15/1996 508
15
103
503
84.5
6.1
16
1016
3/23/2014 22
105
502
105.0
4.7
493.5
14 114
Jones
Annelise
8/20/1993 508
11
17
1017
3/23/2014 18
117
509
34.55
3.8
131.29
Bawangi
Travis
1/25/1992 501
15 115
B
13
18
1018
3/23/2014 25
117
509
34.55
2.2
76.01
16 116
Pratt
Gerald
L
3/5/1997 510
19
1019
3/24/2014 25
104
501
110.5
4.9
541.45
Table:
PROJECT
17 117
Williamson
Angie
H
6/19/1996 509
8
20
1020
3/24/2014 15
101
502
125.0
3.1
387.5
21
3/24/2014 22
PROJ_NUM PROJ_NAME PROJ_VALUE PROJ_BALANCE EMP_NUM
18 118
Frommer
James
1/4/2005 510
1021
108
501
110.5
2.7
298.35
Filter
Filter
Filter
Filter
Filter
22
1022
3/24/2014 22
115
501
110.5
4.9
541.45
23
3/24/2014 22
1 15
Evergreen
1453500.0
1002350.0
103
1023
105
502
125.0
3.5
437.5
24
1024
3/24/2014 15
103
503
84.5
3.3
278.85
2 18
Amber Wave 3500500.0
2110346.0
108
25
1025
3/24/2014 18
117
509
34.55
4.2
145.11
3 22
Rolling Tide
805000.0
500345.2
102
4 25
Starflight
2650500.0
2309880.0
107
O New
D>
Transcribed Image Text:Ship & Sketch O New A New Table: JOB Database Structure Browse Data Execute SQL Edit Pragmas JOB_CODE JOB_DESCRIPTION JOB_CHG_HOUR JOB_LAST_UPDATE Table: ΕMPLOYEΕ be Filter in any column Table: ASSIGNMENT a Filter in any column Filter Filter Filter Filter EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE JOB_CODE EMP_YEARS ASSIGN_NUM ASSIGN_DATE PROJ_NUM EMP_NUM ASSIGN_JOB ASSIGN_CHG_HR ASSIGN_HOURS ASSIGN_CHARGE 1 500 Programmer 35.75 11/20/2013 Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter 2. 501 Systems Analyst 96.75 11/20/2013 1 1001 3/22/2014 18 103 503 84.5 3.5 295.75 1. 101 News John G 11/8/2000 502 4 3 502 Database Designer 125.0 3/24/2014 2 1002 3/22/2014 22 117 509 34.55 4.2 145.11 2 102 Senior David H 7/12/1989 501 15 4 503 Electrical Engineer 84.5 11/20/2013 3 1003 3/22/2014 18 117 509 34.55 2.0 69.1 3 103 Arbough June 12/1/1996 503 8 4 1004 3/22/2014 18 103 503 84.5 5.9 498.55 504 Mechanical Engineer 67.9 11/20/2013 4 104 Ramoras Anne 11/15/1987 501 17 5 1005 3/22/2014 25 108 501 96.75 2.2 212.85 6. 505 Civil Engineer 55.78 11/20/2013 105 Johnson Alice K 2/1/1993 502 12 6 1006 3/22/2014 22 104 501 96.75 4.2 406.35 Clerical Support 11/20/2014 7 506 26.87 6 106 Smithfield William 6/22/2004 500 1007 3/22/2014 25 113 508 50.75 3.8 192.85 8 507 DSS Analyst 45.95 11/20/2013 8 1008 3/22/2014 18 103 503 84.5 0.9 76.05 7 107 Alonzo Maria 10/10/1993 500 11 508 Applications Designer 48.1 3/24/2014 9 1009 3/23/2014 15 115 501 96.75 5.6 541.8 8 108 Washington Ralph B 8/22/1991 501 13 10 509 Bio Technician 34.55 11/20/2013 10 1010 3/23/2014 15 117 509 34.55 2.4 82.92 9 109 Smith Larry W 7/18/1997 501 7 1011 3/23/2014 25 11 510 General Support 18.36 11/20/2013 11 105 502 105.0 4.3 451.5 10 110 Olenko Gerald A 12/11/1995 505 12 1012 3/23/2014 18 108 501 96.75 3.4 328.95 11 111 Wabash Geoff B 4/4/1991 506 14 13 1013 3/23/2014 25 115 501 96.75 2.0 193.5 Snip & Sketch Smithson Darlene 10/23/1994 507 12 112 M 10 14 1014 3/23/2014 22 104 501 96.75 2.8 270.9 1015 3/23/2014 15 515.45 13 113 Joenbrood Delbert K 11/15/1996 508 15 103 503 84.5 6.1 16 1016 3/23/2014 22 105 502 105.0 4.7 493.5 14 114 Jones Annelise 8/20/1993 508 11 17 1017 3/23/2014 18 117 509 34.55 3.8 131.29 Bawangi Travis 1/25/1992 501 15 115 B 13 18 1018 3/23/2014 25 117 509 34.55 2.2 76.01 16 116 Pratt Gerald L 3/5/1997 510 19 1019 3/24/2014 25 104 501 110.5 4.9 541.45 Table: PROJECT 17 117 Williamson Angie H 6/19/1996 509 8 20 1020 3/24/2014 15 101 502 125.0 3.1 387.5 21 3/24/2014 22 PROJ_NUM PROJ_NAME PROJ_VALUE PROJ_BALANCE EMP_NUM 18 118 Frommer James 1/4/2005 510 1021 108 501 110.5 2.7 298.35 Filter Filter Filter Filter Filter 22 1022 3/24/2014 22 115 501 110.5 4.9 541.45 23 3/24/2014 22 1 15 Evergreen 1453500.0 1002350.0 103 1023 105 502 125.0 3.5 437.5 24 1024 3/24/2014 15 103 503 84.5 3.3 278.85 2 18 Amber Wave 3500500.0 2110346.0 108 25 1025 3/24/2014 18 117 509 34.55 4.2 145.11 3 22 Rolling Tide 805000.0 500345.2 102 4 25 Starflight 2650500.0 2309880.0 107 O New D>
1. Write the SQL code that will produce the results shown as below.
PROJ_NAME PROJ_VALUE PROJ_BALANCE EMP_LNAME EMP_FNAME EMP_INITIAL JOB_CODE JOB_DESCRIPTION JOB_CHG_HOUR
Rolling Tide
Evergreen
Starfight
Amber Wave
805000.00
500345.20 Senior
David
Systems Analyst
H
501
96.75
1453500.00
1002350.00 Arbough
June
500
Programmer
35.75
2650500.00
2309880.00 Alonzo
Maria
D.
500
Programmer
Systems Analyst
35.75
3500500.00
2110346.00 Washington Ralph
501
96.75
2. Write the SQL code to calculate the ASSIGN_CHARGE values in the
ASSIGNMENT table. Note that ASSIGN_CHARGE is a derived attribute that is
calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.
3. 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 result is
shown as below.
EMP NUM EMP LNAME SumoFASSIGN HOURS SumOfASSIGN CHARGE
387.50
1664.65
101
News
3.1
103
Arbough
Ramoras
19.7
104
105
108
11.9
1218.70
1382.50
840.15
192.85
1276.75
649.54
Johnson
12.5
8.3
|Washington
Joenbrood
113
3.8
115
Bawangi
12.5
117
Williamson
18.8
Transcribed Image Text:1. Write the SQL code that will produce the results shown as below. PROJ_NAME PROJ_VALUE PROJ_BALANCE EMP_LNAME EMP_FNAME EMP_INITIAL JOB_CODE JOB_DESCRIPTION JOB_CHG_HOUR Rolling Tide Evergreen Starfight Amber Wave 805000.00 500345.20 Senior David Systems Analyst H 501 96.75 1453500.00 1002350.00 Arbough June 500 Programmer 35.75 2650500.00 2309880.00 Alonzo Maria D. 500 Programmer Systems Analyst 35.75 3500500.00 2110346.00 Washington Ralph 501 96.75 2. Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table. Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS. 3. 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 result is shown as below. EMP NUM EMP LNAME SumoFASSIGN HOURS SumOfASSIGN CHARGE 387.50 1664.65 101 News 3.1 103 Arbough Ramoras 19.7 104 105 108 11.9 1218.70 1382.50 840.15 192.85 1276.75 649.54 Johnson 12.5 8.3 |Washington Joenbrood 113 3.8 115 Bawangi 12.5 117 Williamson 18.8
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY