Question
Task 7: Create a view named INVOICE_TOTAL. It consists of the invoice number and invoice total for each invoice currently on file. (The invoice total
Task 7: 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.
Task 8: Using the INVOICE_TOTAL VIEW write and execute the command to retrieve the invoice number and invoice total for only those orders totaling more than $250.
Task 9: Repeat Task 8 without using the INVOICE_TOTAL VIEW.
Below is the table named INVOICE_LINE
In Task 7, I don't know how to combine duplicate rows on INVOICE_NUM column like shown in the picture below:
INVOICE_NUM ITEM_ID QUANTITY QUOTED_PRICE 14216 CA75 37.99 14219 AD72 79.99 m N . 14219 DT12 4 39.99 14222 LD14 47.99 14224 KH81 4 18.99 14228 FS42 1 124.99 14228 PF19 1 74.99 Expected Results INVOICE_NUM TOTAL_AMOUNT 14216 113.97 14219 319.94 14222 47.99 14224 75.96 14228 199.98 14231 379.98 14233 759.59 14237 164.85 Actual Results INVOICE_NUM TOTAL_AMOUNT 14216 113.97 14219 159.98 14219 159.96 14222 47.99 14224 75.96 14228 124.99 14228 74.99 14231 379.98 14233 19.99 14233 439.80Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started