Write a query to display the customer code, balance, and total purchases for each customer. Total purchase
Question:
Write a query to display the customer code, balance, and total purchases for each customer. Total purchase is calculated by summing the line subtotals (as calculated in Problem 12) for each customer. Sort the results by customer code, and use aliases as shown in Figure P7.13.
Data in 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.
Step by Step Answer:
Database Systems Design Implementation And Management
ISBN: 9780357673034
14th Edition
Authors: Carlos Coronel, Steven Morris