Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

In Task 7, I don't know how to combine duplicate rows on INVOICE_NUM column like shown in the picture below:

image text in transcribed

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.80

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

Different formulas for mathematical core areas.

Answered: 1 week ago