Group By is used more to summarize the data in your recordset and is
used in conjunction with an aggregate value. i.e. 

Use Northwind
Select Companyname, Sum(Freight) as 'Total Freight' from Orders Join
Customers On Orders.CustomerID = Customers.CustomerID Group By
CompanyName
Order by Companyname

The above select statement will return the total freight for each
customer only listing the customer once, even though they have placed
many orders.

Hope that helps

Larry Hough


-----Original Message-----
From: Sam Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 4:12 AM
To: ActiveServerPages
Subject: GROUP BY question

Will using GROUP BY help me cut down the amount of records that are
returned? Or does it just organise them?

Can I use it without using an aggregate function?

Thanks, Sam


---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to