Generating reports Month X Year

U

UGA Ag Dawg

I have a long data set that has prices listed weekly, example

Week ended Price
01/01/1980 $100
01/08/1980 $105
..
..
12/31/2003 $78

How do I design a Query/report that will give me the average of these prices
by month by year with the columns being the month and the rows being the
years?

Any help is greatly appreciated!!
 
K

KARL DEWEY

TRANSFORM Avg(Pricing.Price) AS AvgOfPrice
SELECT Year([Week Ended]) AS [Year]
FROM Pricing
GROUP BY Year([Week Ended])
PIVOT Month([Week Ended]) & " - " & Format([Week Ended],"mmmm");
 
Top