Multiple Date Ranges in One Query?

bs0d

New member
Local time
Today, 13:25
Joined
Aug 29, 2008
Messages
2
Is it possible to query for example the average of a value given multiple conditions in time?

Like:

Average value for 1st Qtr, 2nd Qtr, and so on in one single query?

I know how to execute a query for one quarter, but this goes for several years and the query count gets excessive.

One table with each quarter as a column is idea...
 
That would be a crosstab query...

Lookup the "Format" "Year" and "Month" functions in the access help and see how far you can go from there. Post back any questions you have.
 
For quarters you probably want to sue a crosstab as namliam has suggested but another method is a totals query. Select the date field and the amount field. Then press the sigma button to make a totals query. Change the option for the amount field from group by to sum. If your table contains multiple dates for each quarter, you'll need to format the date so that it shows just the year and quarter.
 

Users who are viewing this thread

Back
Top Bottom