Grouping and averaging in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with a large amount of data in it (Area Codes and Prefix
[NPA-Nxx]) and I need to sort those by state. Once sorted, each Area Code
and Prefix has a cost associated with it. I'd like to average the cost per
state among all Area Codes and Prefixes in that state.

Can this be done with a query? Any help is appreciated.

Thanks,

Kevin G
 
Jeff L said:
If you just want the Average cost per state, you will need the
following:

Select State, Avg(Cost)
Group by State

Sometimes it's just too easy!!! This worked perfect!!! Thanks!!!

Kevin
 
Back
Top