P
Paul
Hello There, I am trying to get this query to work but have hit a road
block....see below
'Sample - RecyHistory Table Data:
DateRec PalletCount
12/1/08 2
12/1/08 3
12/8/08 5
12/15/08 2
12/15/08 6
'Query to get average number of pallets received for each day of the week
SELECT DatePart("w",RecyHistory.DateRec) AS DayOfTheWeek,
Sum(RecyHistory.PalletCount) AS PalletCountTotal,
Avg(RecyHistory.PalletCount) AS PalletCountAverage
FROM RecyHistory
GROUP BY DatePart("w",RecyHistory.DateRec);
' Output of the above Query:
DayOfWeek PalletCountTotal PalletCountAverage
2 18 3.6
*********************************************************************************************
' What I am looking for:
DayOfWeek PalletCountTotal PalletCountAverage
2 18 6
' Dates should be "unique", and the pallet Count should be summed
accordingly, ie:
12/1/08 3 + 2 =5
12/8/08 =5
12/15/08 2 + 6 =8
Thank you,
Paul
block....see below
'Sample - RecyHistory Table Data:
DateRec PalletCount
12/1/08 2
12/1/08 3
12/8/08 5
12/15/08 2
12/15/08 6
'Query to get average number of pallets received for each day of the week
SELECT DatePart("w",RecyHistory.DateRec) AS DayOfTheWeek,
Sum(RecyHistory.PalletCount) AS PalletCountTotal,
Avg(RecyHistory.PalletCount) AS PalletCountAverage
FROM RecyHistory
GROUP BY DatePart("w",RecyHistory.DateRec);
' Output of the above Query:
DayOfWeek PalletCountTotal PalletCountAverage
2 18 3.6
*********************************************************************************************
' What I am looking for:
DayOfWeek PalletCountTotal PalletCountAverage
2 18 6
' Dates should be "unique", and the pallet Count should be summed
accordingly, ie:
12/1/08 3 + 2 =5
12/8/08 =5
12/15/08 2 + 6 =8
Thank you,
Paul