Using the output shown in Figure P7.12 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
**Problem 12**

Using the output shown in Figure P7.12 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.

**Table Description (Figure P7.12):**

The table lists customer purchases and includes the following columns:

- **CUS_CODE**: Customer Code
- **INV_NUMBER**: Invoice Number
- **P_DESCRIPT**: Product Description
- **Units Bought**: Number of Units Purchased
- **Unit Price**: Price per Unit
- **Subtotal**: Total Price for the Line Item (Units Bought x Unit Price)

**Table Contents:**

| CUS_CODE | INV_NUMBER | P_DESCRIPT                     | Units Bought | Unit Price | Subtotal |
|----------|------------|--------------------------------|--------------|------------|----------|
| 10011    | 1002       | Rat-tail file, 1/8-in. fine    | 2.00         | 4.99       | 9.98     |
| 10011    | 1004       | Claw hammer                    | 2.00         | 9.95       | 19.90    |
| 10011    | 1004       | Rat-tail file, 1/8-in. fine    | 3.00         | 4.99       | 14.97    |
| 10011    | 1008       | Claw hammer                    | 1.00         | 9.95       | 9.95     |
| 10011    | 1008       | PVC pipe, 3.5-in., 8-ft        | 5.00         | 5.87       | 29.35    |
| 10011    | 1008       | Steel matting, 4'x8'x1/6', .5" mesh | 3.00         | 119.95     | 359.85   |
| 10012    | 1003       | 7.25-in. pwr. saw blade        | 5.00         | 14.99      | 74.95    |
|
Transcribed Image Text:**Problem 12** Using the output shown in Figure P7.12 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. **Table Description (Figure P7.12):** The table lists customer purchases and includes the following columns: - **CUS_CODE**: Customer Code - **INV_NUMBER**: Invoice Number - **P_DESCRIPT**: Product Description - **Units Bought**: Number of Units Purchased - **Unit Price**: Price per Unit - **Subtotal**: Total Price for the Line Item (Units Bought x Unit Price) **Table Contents:** | CUS_CODE | INV_NUMBER | P_DESCRIPT | Units Bought | Unit Price | Subtotal | |----------|------------|--------------------------------|--------------|------------|----------| | 10011 | 1002 | Rat-tail file, 1/8-in. fine | 2.00 | 4.99 | 9.98 | | 10011 | 1004 | Claw hammer | 2.00 | 9.95 | 19.90 | | 10011 | 1004 | Rat-tail file, 1/8-in. fine | 3.00 | 4.99 | 14.97 | | 10011 | 1008 | Claw hammer | 1.00 | 9.95 | 9.95 | | 10011 | 1008 | PVC pipe, 3.5-in., 8-ft | 5.00 | 5.87 | 29.35 | | 10011 | 1008 | Steel matting, 4'x8'x1/6', .5" mesh | 3.00 | 119.95 | 359.85 | | 10012 | 1003 | 7.25-in. pwr. saw blade | 5.00 | 14.99 | 74.95 | |
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education