How to Average multiple fields in a Query

makku

New member
Local time
Today, 22:43
Joined
Oct 7, 2008
Messages
6
I would like to Average multiple fields in a query. For example I would like to Avg [Field1], [Field2] & [Field3].

How can I do it?
 
Not sure what you mean, but the following will give you the average of all three fields (individually).

Code:
Select [B][COLOR=#ff0000]SomethingtoGroupon[/COLOR][/B], Avg(Field1), Avg(Field2), Avg(Field3)
From MyTable
Group By [COLOR=red][B]SomethingtoGroupon[/B][/COLOR]

Note that SomethingtoGroupon must be at least one additional field, and that all non-grouped Fields must appear in the Group By Statement.
 

Users who are viewing this thread

Back
Top Bottom