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;

