Question: write a query that returns a row for each customer...
Write a query that returns a row for each customer, a count
of invoices for each customer, the total extended price of all invoices,
the min value, and the max value of the invoice total.
To get the total value of an invoice, you have
to sum up the extended price value in the InvoiceLines table.
we use the Invoices, InvoiceLines, and Customers
tables. The first two tables join on the InvoiceID column. Customers joins
to Invoices on the CustomerID. Order the results by the
count of invoices (lDESC), then by the largest invoice (ASC).