Grouping by Date

torquay

Registered User.
Local time
Today, 12:36
Joined
Dec 27, 2005
Messages
85
Not sure why this seems so difficult for me to fix.
Have a field OrderDate which carries dates of sales. I am trying to group the date into days
Currently I have
OrderDate SaleAmount
6/6/08 100
6/6/08 150
6/6/08 120
7/5/08 130
7/6/08 100
8/6/08 100
8/6/08 200
8/6/08 250

I would like
6/6/08 370
7/6/08 230
8/6/08 550

When I try and group by date I still get the dates individually

Thanks
 
You might try this sql :

SELECT DISTINCTRow Yourtable.OrderDate,
Sum(Yourtable.SaleAmount) AS SumOfSaleAmount
FROM Yourtable
GROUP BY Yourtable.OrderDate
ORDER BY Yourtable.OrderDate;


Hth
 

Users who are viewing this thread

Back
Top Bottom