In MyGuitarShop, SQL query to return the total number of times each product has been ordered. This
Fantastic news! We've Found the answer you've been seeking!
Question:
In MyGuitarShop, SQL query to return the total number of times each product has been ordered. This query lists the product name and number of times it has been ordered.
1) Orders Database: PK is OrderID; FK is CustomerID; other fields include: OrderDate, ShipAmount, TaxAmount, ShipDate, ShipAddressID, CardType, CardNumber, CardExpires, BillingAddressID
2) OrderItems Database: PK is ItemID; FK is OrderID and ProductID; other field names: ItemPrice, DiscountAmount, Quantity
3) Products Database: PK is ProductID; FK is CategoryID; other field names: ProductCode, ProductName, Description, ListPrice, DiscountPercent, DateAdded
Note: ProductID is not same as OrderID
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date: