1.Your accounting department needs to know the total amount ordered for each pro
ID: 3749473 • Letter: 1
Question
1.Your accounting department needs to know the total amount ordered for each product in the Guitar Shop. They want a report with the product’s name and the total dollar amount for each product.
2. During a meeting you are asked to find out which customers have ordered more than one product. Create a query that returns the email address and the number of distinct products from the customer’s orders.
Vendors VendorlD VendorAddress1 VendorAddress2 VendorCity VendorZipCode DefaultTermsID GLAccounts AccountNo Invoices ! InvoiceID VendorID Terms 9 TermslD InvoiceTotal PaymentTotal CreditTotal TermsID InvoiceLineltems Te InvoicelD InvoiceSequence InvoiceLineltemAmountExplanation / Answer
Hi, I have provided answer for your first question for second question assuming VendorName as product Name and PaymentTotal is in dollors
*****************************************************
SELECT VendorName, sum(PaymentTotal) as PaymentTotal
from Vendors v
inner join Invoices i on i.VendorID = v.VendorID
group by VendorID;
*****************************************************
For second question you asked to list email of the the customers along with the number of products bought by them but you table doesnt contains
customer email. its not possible to list the data if there are any changes in your table let me know.
Thank You.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.