title: GROUP ORDER with sums and average
body: <pre><code>Question:groups orders by CUSTOMER.LastName, CUSTOMER.FirstName 
  and INVOICE.InvoiceNumber in that order, and (3) sums and averages.
  </code></pre>
  
  <p>My query:</p>
  
  <pre><code>CREATE VIEW CustomerOrderHistoryView AS
  SELECT INVOICENUMBER,FIRSTNAME,LASTNAME,PHONE,DATEIN,DATEOUT,SUBTOTAL,
  EXTENDEDPRICE FROM CUSTOMERORDERSUMMARYVIEW
  GROUP BY LASTNAME,FIRSTNAME,INVOICENUMBER;
  </code></pre>
  
  <p>But i get an error. 
  NOT A GROUP BY expression
  what should i change in order to follow the requirement of my questions? and what the quesiton mean by (3) sums and averages? suspect question unclear</p>