0
Question:groups orders by CUSTOMER.LastName, CUSTOMER.FirstName 
and INVOICE.InvoiceNumber in that order, and (3) sums and averages.

My query:

CREATE VIEW CustomerOrderHistoryView AS
SELECT INVOICENUMBER,FIRSTNAME,LASTNAME,PHONE,DATEIN,DATEOUT,SUBTOTAL,
EXTENDEDPRICE FROM CUSTOMERORDERSUMMARYVIEW
GROUP BY LASTNAME,FIRSTNAME,INVOICENUMBER;

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

user3553846
  • 342
  • 1
  • 15
  • Hi, as a minimum, please include error messages when posting a question. You haven't posted any where near enough information in order to determine what your question is about, but the main part is answered in the duplicate. Once you have your SQL sorted out please post the full question you're being asked. and the DDL of the table you're selecting from, otherwise it's extremely difficult to help. Please also note that if you ask for help with your homework that's absolutely fine. However, it may be construed as cheating by the institution you attend... – Ben May 17 '14 at 14:36
  • included. how about the quesiton mean sums and averages? – user3553846 May 17 '14 at 14:50

0 Answers0