i want to retrieve the newest order and the name of the customer who ordered it:
Select fname, lname, orderdate as newestorder from customer, cusorder where customer.cid = cusorder.cid group by fname, lname having orderdate = max(orderdate) ;
the error is ORA-00979: not a GROUP BY expression
