R
Richard Murphy
Hey all,
I have a query that counts the number of items sold per month e.g.
Month CountofItemsSold
August, 2006 50
Semptember, 2006 45
October, 2006 60
November, 2006 47
December, 2006 52
January, 2007 38
In a separate table have a record of the number of days that the store
is open in each month per year (let's assume that the year goes from
August, 2006 - July, 2007 e.g.
Yearid Aug Sept Oct year
1 12 18 22 2006-2007
The number of days are static (entered at the beginning of the year)
while the number of items sold are dynamic.
I need to be able to divide the number of items sold by the number of
days in the month in order to get the average items sold per month. I
need the data to look like the chart below:
Year Month Dayscount Itemsoldcount Avgitemssold
2006 August 12 50 4.17
2006 September 18 45 2.5
2006 October 22 60 2.72
I can't figure out how to get the number of days in a specific month,
year to relate to the number of items sold in a specific month, year so
that I can do the math. Any suggestions would be MUCH appreciated. RM
I have a query that counts the number of items sold per month e.g.
Month CountofItemsSold
August, 2006 50
Semptember, 2006 45
October, 2006 60
November, 2006 47
December, 2006 52
January, 2007 38
In a separate table have a record of the number of days that the store
is open in each month per year (let's assume that the year goes from
August, 2006 - July, 2007 e.g.
Yearid Aug Sept Oct year
1 12 18 22 2006-2007
The number of days are static (entered at the beginning of the year)
while the number of items sold are dynamic.
I need to be able to divide the number of items sold by the number of
days in the month in order to get the average items sold per month. I
need the data to look like the chart below:
Year Month Dayscount Itemsoldcount Avgitemssold
2006 August 12 50 4.17
2006 September 18 45 2.5
2006 October 22 60 2.72
I can't figure out how to get the number of days in a specific month,
year to relate to the number of items sold in a specific month, year so
that I can do the math. Any suggestions would be MUCH appreciated. RM