I am studying for my Final exam in CIS 365 and we have always learned that you normally, a good majority of the time (ALWAYS), ONLY use 'Group By' and 'Having' clauses when an aggregate function is present in your query. However I was looking over some sample code I found on the internet and there was a query that read
'/*Query 5. Customer payment info including all relevant data. */
CREATE VIEW CustomerPaymentInfo
as SELECT C.CustomerID, C.CustomerFName as 'Customer First Name', C.CustomerLName as 'Customer Last Name', C.CreditAuthorization as 'Credit Authorized?', C.CreditLimit as 'Credit Limit'
FROM Customer C
GROUP BY C.CustomerID, C.CustomerFName, C.CustomerLName, C.CreditAuthorization, C.CreditLimit;
SELECT * FROM CustomerPaymentInfo;'
If there is no aggregate in this code why is there a 'group by' clause?! Please help ASAP