Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average Query

Status
Not open for further replies.

gearhead03

Technical User
Mar 29, 2003
147
US
I drive and get paid per mile. Different rates per state. I want a query that will give me my AVERAGE rate for each state for last year. I want the report to only list each state and the average rate. I have been trying to accomplish this using the wizards and getting my butt kicked.

Field names:
Date
State
Rate (Currency)

Thank you in advance for your help.

Mark A. Kale
 
something like this maybe:

SELECT STATE, AVG(Rate) FROM TableName WHERE [Date] Between #1/1/2005# and #12/31/2005# GROUP BY State

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top