Write a SELECT statement that answers the following question

Write a SELECT statement that answers the following question: What is the total amount invoiced for each AccountNo? Use the with ROLLUP operator to include a row that gives the grand total. Hint: Use the InvoicedLineItemAmount column of the InvoicedLineItems table

Solution

SELECT AccountNo, SUM(InvoiceLineItemAmount) AS LineItemSum
FROM InvoiceLineItems
GROUP BY AccountNo WITH ROLLUP;

Write a SELECT statement that answers the following question: What is the total amount invoiced for each AccountNo? Use the with ROLLUP operator to include a ro

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site