2- Using the output shown below as your guide, generate a list of customer purchases, including the subtotals for each of the invoice line numbers. The subtotal is a derived attribute calculated by multiplying LINE_UNITS by LINE_PRICE. Sort the output by customer code, invoice number, and product description. Be certain to use the column aliases as shown in the figure. P DESCRPT 1002 Rat-tail file, 1/8-in. fine 1004 Claw hammer 1004 Rat-tail fle, 1/8-in. fine 1008 Claw hammer CUS_CODE INV_NUMBER 10011 Units Bought Unit Price 4.99 Subtotal 2 9.98 10011 2 9.95 19.90 10011 3 4.99 14.97 10011 9.95 9.95 10011 1008 PVC pipe, 3.5-in., 8-fA 1008 Steel matting, 4x8x1/6", 5" mesh 1003 7.25-in. pwr. saw blade 1003 B&D cordless drill, 1/2-in. 1003 Hrd. cloth, 1/4-in., 2x50 1001 7.25 in. pwr. saw blade 1001 Claw hammer 5.87 29.35 359.85 74.95 10011 3 119.95 10012 5 14.99 10012 1 38.95 38.95 10012 1 39.95 39.95 10014 14.99 14.99 9.95 6.99 109.92 10014 1 9.95 20.97 109.92 10014 1006 1.25-in. metal screw, 25 3 1006 B&D jigsaw, 12-in. blade 1006 Claw hammer 1006 Hicut chain saw, 16 in. 1007 7.25-in. pwr. saw blade 1007 Rat-tail file, 1/8-in. fine 1005 PVC pipe, 3.5-in., 8-ft 10014 1 10014 1 9.95 9.95 10014 1 256.99 256.99 10015 2 14.99 29.98 10015 1 4.99 499 10018 12 5.87 7044

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 3MC
icon
Related questions
Question
Given a small company database tables below. Create the database and tables for the company and
answer all the questions below.
LINE
CUSTOMER
VENDOR
INV_NUMBER LINE_NUMBER P_CODE LINE_UNITS LINE_PRICE
Cus CODE CUS_LNAME CUS_FNAME CUS_INITIAL cus AREACODE CUS_PHONE CUS_BALANCE
V_CODE
V_NAME
V_CONTACT V_AREACODE V_PHONE V_STATE V_ORDER
1000
3 23100-HB
0.05
10010 Ramas
Afred
015
844-2573
21225 Bryson, Ine.
Smithson
015
223-3234 TN
1006
4 89-WRE-Q
256.00
10011 Dunne
Leona
713
804-1238
21220 SuperLoo, Inc.
Flushing
04
215-8006 FL
N
1 13-Q2/P2
2
14.00
1007
10012 Smith
Kathy
015
804-2205
345.88
21231 DSE Supply
Singh
815
228-3246 TN
1007
254778-2T
4.00
10013 Olowski
Paul
815
804-2100
530.75
21344 Gomez Bros.
Ortega
815
889-2546 KY
N
1008
1 PVC23DRT
5.87
10014 Orlando
Myron
le15
222-1872
22507 Dome Supply
Smith
01
e78-1419 GA
IN
1008
2 WR3/TT3
3
110.05
10015 OBrian
Amy
713
442-3381
23110 Randsets Ltd.
Anderson
001
078-3008 GA
1008
3 23100-HB
0.05
10010 Brown
James
015
297-1228
221.19
24004 Brackman Bros. Browning
615
228-1410 TN
IN
10017 Wiliams
George
015
290-2556
788.9
24288 JORDVA, Inc.
Hakford
815
e08-1234 TN
PRODUCT
10018 Fariss
Anne
713
382-7185
25443 BAK, Inc.
904
227-0003 FL
216.55
Smith
P_CODE
P_DESCRIPT
P_INDATE P_QOHP_MIN P_PRICE P_DISCOUNT V_CODE
10019 Smith
015
207-3800
25501|Damal Supplies Smythe
015
e90-3529 TN
IN
Olette
11QER/31 Power painter, 15 psi, 3-nozzle
03-Nov-17
100.00
0.00
25505
25505 Rubicon Systems Orton
904
450-0002 FL
13-02/P2 7.25-in. pwr. saw blade
13-Dec-17
32
15
14.00
0.05 21344
INVOICE
14-Q1/L3 9.00-in. pwr. saw blade
13-Nov-17
18
12
17.40
0.00 21344
LINE
INV_NUMBER CUS_CODE INV_DATE
1548-002 Hrd. cloth, 14-in. 2x50
0.00 23110
15-Jan-18
15
30.95
INV_NUMBER LINE_NUMBER P_CODE LINE_UNITS LINE_PRICE
1001
10014 10-Jan-18
1558-QW1 Hrd. cloth. 1/2-in. 3x50
0.00 23119
15-Jan-18
23
43.00
1001
1 13-Q2/P2
14.00
1
1002
10011 10-Jan-18
2232/QTY BAD igsaw, 12-in, blade
30-Dec-17
100.02
8
0.05
24288
1001
2 23100-HB
1
9.05
1003
10012 16-Jan-18
2232/QWE BAD jgsaw, B-in. blade
24-Deo-17
00.87
0.05
24288
1002
154778-2T
4.00
1004
10011 17-Jan-18
2238/OPD B&D cordless drill, 1/2-in.
20-Jan-18
12
38.95
0.05
25505
1003
1 2238/QPD
38.05
1005
10018 17-Jan-18
23100-HB Ciaw hammer
20-Jan-18
23
10
9.05
0.10
21225
1003
2 1546-Q02
1
39.05
1000
10014 17-Jan-18
23114-AA Sledge hammer, 12 Ib.
02-Jan-18
8
14.4
0.05
1003
3 13-02/P2
5
14.90
1007
10015 17-Jan-18
54778-2T Rat-tail fie. 1/8-in. fine
15-Dec-17
4.90
1004
154778-2T
3.
4.00
43
20
0.00
21344
1008
10011 17-Jan-18
9.05
80-WRE-Q Hicut chain saw, 10 in.
07-Feb-18
1004
2 23109-HB
2
11
256.00
0.05
24288
1005
1 PVC23DRT
12
PVC23DRT PvC pipe. 3.5-in., 8-A
20-Feb-18
188
75
5.87
0.00
5.87
PRODUCT
1006
1 SM-18277
3
0.00
SM-18277 1.25-in. metal screw, 25
01-Mar-18
0.00 21225
172
75
6.00
P CODE
P DESCRIPT
PINDATE P_QOH P_MIN P_PRICEP_DISCOUNT V_CODE
1006
2 2232/QTY
1
109.92
sw-23116 2.5-in, wd. screw. 50
24-Feb-18
237 100
8.45
0.00 21231
WR3TT3 Steel matting. 4x8x1/8". 5" mesh 17-Jan-18
18
5
119.95
0.10 25606
25595
Transcribed Image Text:Given a small company database tables below. Create the database and tables for the company and answer all the questions below. LINE CUSTOMER VENDOR INV_NUMBER LINE_NUMBER P_CODE LINE_UNITS LINE_PRICE Cus CODE CUS_LNAME CUS_FNAME CUS_INITIAL cus AREACODE CUS_PHONE CUS_BALANCE V_CODE V_NAME V_CONTACT V_AREACODE V_PHONE V_STATE V_ORDER 1000 3 23100-HB 0.05 10010 Ramas Afred 015 844-2573 21225 Bryson, Ine. Smithson 015 223-3234 TN 1006 4 89-WRE-Q 256.00 10011 Dunne Leona 713 804-1238 21220 SuperLoo, Inc. Flushing 04 215-8006 FL N 1 13-Q2/P2 2 14.00 1007 10012 Smith Kathy 015 804-2205 345.88 21231 DSE Supply Singh 815 228-3246 TN 1007 254778-2T 4.00 10013 Olowski Paul 815 804-2100 530.75 21344 Gomez Bros. Ortega 815 889-2546 KY N 1008 1 PVC23DRT 5.87 10014 Orlando Myron le15 222-1872 22507 Dome Supply Smith 01 e78-1419 GA IN 1008 2 WR3/TT3 3 110.05 10015 OBrian Amy 713 442-3381 23110 Randsets Ltd. Anderson 001 078-3008 GA 1008 3 23100-HB 0.05 10010 Brown James 015 297-1228 221.19 24004 Brackman Bros. Browning 615 228-1410 TN IN 10017 Wiliams George 015 290-2556 788.9 24288 JORDVA, Inc. Hakford 815 e08-1234 TN PRODUCT 10018 Fariss Anne 713 382-7185 25443 BAK, Inc. 904 227-0003 FL 216.55 Smith P_CODE P_DESCRIPT P_INDATE P_QOHP_MIN P_PRICE P_DISCOUNT V_CODE 10019 Smith 015 207-3800 25501|Damal Supplies Smythe 015 e90-3529 TN IN Olette 11QER/31 Power painter, 15 psi, 3-nozzle 03-Nov-17 100.00 0.00 25505 25505 Rubicon Systems Orton 904 450-0002 FL 13-02/P2 7.25-in. pwr. saw blade 13-Dec-17 32 15 14.00 0.05 21344 INVOICE 14-Q1/L3 9.00-in. pwr. saw blade 13-Nov-17 18 12 17.40 0.00 21344 LINE INV_NUMBER CUS_CODE INV_DATE 1548-002 Hrd. cloth, 14-in. 2x50 0.00 23110 15-Jan-18 15 30.95 INV_NUMBER LINE_NUMBER P_CODE LINE_UNITS LINE_PRICE 1001 10014 10-Jan-18 1558-QW1 Hrd. cloth. 1/2-in. 3x50 0.00 23119 15-Jan-18 23 43.00 1001 1 13-Q2/P2 14.00 1 1002 10011 10-Jan-18 2232/QTY BAD igsaw, 12-in, blade 30-Dec-17 100.02 8 0.05 24288 1001 2 23100-HB 1 9.05 1003 10012 16-Jan-18 2232/QWE BAD jgsaw, B-in. blade 24-Deo-17 00.87 0.05 24288 1002 154778-2T 4.00 1004 10011 17-Jan-18 2238/OPD B&D cordless drill, 1/2-in. 20-Jan-18 12 38.95 0.05 25505 1003 1 2238/QPD 38.05 1005 10018 17-Jan-18 23100-HB Ciaw hammer 20-Jan-18 23 10 9.05 0.10 21225 1003 2 1546-Q02 1 39.05 1000 10014 17-Jan-18 23114-AA Sledge hammer, 12 Ib. 02-Jan-18 8 14.4 0.05 1003 3 13-02/P2 5 14.90 1007 10015 17-Jan-18 54778-2T Rat-tail fie. 1/8-in. fine 15-Dec-17 4.90 1004 154778-2T 3. 4.00 43 20 0.00 21344 1008 10011 17-Jan-18 9.05 80-WRE-Q Hicut chain saw, 10 in. 07-Feb-18 1004 2 23109-HB 2 11 256.00 0.05 24288 1005 1 PVC23DRT 12 PVC23DRT PvC pipe. 3.5-in., 8-A 20-Feb-18 188 75 5.87 0.00 5.87 PRODUCT 1006 1 SM-18277 3 0.00 SM-18277 1.25-in. metal screw, 25 01-Mar-18 0.00 21225 172 75 6.00 P CODE P DESCRIPT PINDATE P_QOH P_MIN P_PRICEP_DISCOUNT V_CODE 1006 2 2232/QTY 1 109.92 sw-23116 2.5-in, wd. screw. 50 24-Feb-18 237 100 8.45 0.00 21231 WR3TT3 Steel matting. 4x8x1/8". 5" mesh 17-Jan-18 18 5 119.95 0.10 25606 25595
2- Using the output shown below as your guide, generate a list of customer purchases, including the
subtotals for each of the invoice line numbers. The subtotal is a derived attribute calculated by
multiplying LINE_UNITS by LINE_PRICE. Sort the output by customer code, invoice number, and product
description. Be certain to use the column aliases as shown in the figure.
CUS CODE INV_NUMBER
P_DESCRIPT
Units Bought
Subtotal
Unit Price
1002 Rat-tail file, 1/8-in. fine
1004 Claw hammer
10011
2
4.99
9.98
10011
2
9.95
19.90
10011
1004 Rat-tail file, 1/8-in. fine
3
4.99
14.97
1008 Claw hammer
1008 PVC pipe. 3.5-in., 8-ft
1008 Steel matting, 4'x8x1/6", 5" mesh
1003 7.25-in. pwr. saw blade
1003 B&D cordless drill, 1/2-in.
1003 Hrd. cloth, 1/4-in., 2x50
1001 7.25 in. pwr. saw blade
1001 Claw hammer
1006 1.25-in. metal screw, 25
1006 B&D jigsaw, 12-in. blade
1006 Claw hammer
1006 Hicut chain saw, 16 in.
1007 7.25-in. pwr. saw blade
1007 Rat-tail file, 1/8-in. fine
1005 PVC pipe, 3.5-in., 8-ft
9 95
29.35
10011
1
9.95
10011
5.87
10011
119.95
359.85
10012
5
14.99
74.95
10012
1
38.95
38.95
10012
1
39.95
39.95
10014
14.99
14.99
10014
9.95
9.95
6.99
1
10014
20.97
109.92
9.95
10014
109.92
10014
1
9.95
10014
256.99
256.99
10015
14.99
29.98
10015
4.99
4.99
10018
5.87
70.44
212
Transcribed Image Text:2- Using the output shown below as your guide, generate a list of customer purchases, including the subtotals for each of the invoice line numbers. The subtotal is a derived attribute calculated by multiplying LINE_UNITS by LINE_PRICE. Sort the output by customer code, invoice number, and product description. Be certain to use the column aliases as shown in the figure. CUS CODE INV_NUMBER P_DESCRIPT Units Bought Subtotal Unit Price 1002 Rat-tail file, 1/8-in. fine 1004 Claw hammer 10011 2 4.99 9.98 10011 2 9.95 19.90 10011 1004 Rat-tail file, 1/8-in. fine 3 4.99 14.97 1008 Claw hammer 1008 PVC pipe. 3.5-in., 8-ft 1008 Steel matting, 4'x8x1/6", 5" mesh 1003 7.25-in. pwr. saw blade 1003 B&D cordless drill, 1/2-in. 1003 Hrd. cloth, 1/4-in., 2x50 1001 7.25 in. pwr. saw blade 1001 Claw hammer 1006 1.25-in. metal screw, 25 1006 B&D jigsaw, 12-in. blade 1006 Claw hammer 1006 Hicut chain saw, 16 in. 1007 7.25-in. pwr. saw blade 1007 Rat-tail file, 1/8-in. fine 1005 PVC pipe, 3.5-in., 8-ft 9 95 29.35 10011 1 9.95 10011 5.87 10011 119.95 359.85 10012 5 14.99 74.95 10012 1 38.95 38.95 10012 1 39.95 39.95 10014 14.99 14.99 10014 9.95 9.95 6.99 1 10014 20.97 109.92 9.95 10014 109.92 10014 1 9.95 10014 256.99 256.99 10015 14.99 29.98 10015 4.99 4.99 10018 5.87 70.44 212
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Basic sql queries
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning