Create a view named INVOICE_TOTAL. It consists of the invoice number and invoice total for each invoice currently on file. (The invoice total is the sum of the number of units ordered multiplied by the quoted price on each invoice line for each invoice.) Sort the rows by invoice number. Use TOTAL_AMOUNT as the name for the invoice total.

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 69C: Update the DETAILRENTAL table to set the values in DETAIL_RETURNDATE to include a time component....
icon
Related questions
Question

Create a view named INVOICE_TOTAL. It consists of the invoice number and invoice total for each invoice currently on file. (The invoice total is the sum of the number of units ordered multiplied by the quoted price on each invoice line for each invoice.) Sort the rows by invoice number. Use TOTAL_AMOUNT as the name for the invoice total.

INVOICE_NUM
ITEM_ID
QUANTITY
QUOTED_PRICE
14216
CA75
37.99
14219
AD72
2
79.99
14219
DT12
4
39.99
14222
LD14
1
47.99
14224
KH81
4
18.99
14228
FS42
1
124.99
14228
PF19
1
74.99
14231
UF39
2
189.99
14233
KH81
1
19.99
14233
QB92
109.95
14233
WB49
4
74.95
14237
LP73
54.95
3.
Transcribed Image Text:INVOICE_NUM ITEM_ID QUANTITY QUOTED_PRICE 14216 CA75 37.99 14219 AD72 2 79.99 14219 DT12 4 39.99 14222 LD14 1 47.99 14224 KH81 4 18.99 14228 FS42 1 124.99 14228 PF19 1 74.99 14231 UF39 2 189.99 14233 KH81 1 19.99 14233 QB92 109.95 14233 WB49 4 74.95 14237 LP73 54.95 3.
INVOICE_NUM
INVOICE_DATE
CUST_ID
14216
2021-11-15
125
14219
2021-11-15
227
14222
2021-11-16
294
14224
2021-11-16
182
14228
2021-11-18
435
14231
2021-11-18
125
14233
2021-11-18
435
14237
2021-11-19
616
Transcribed Image Text:INVOICE_NUM INVOICE_DATE CUST_ID 14216 2021-11-15 125 14219 2021-11-15 227 14222 2021-11-16 294 14224 2021-11-16 182 14228 2021-11-18 435 14231 2021-11-18 125 14233 2021-11-18 435 14237 2021-11-19 616
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
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.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning