View Full Version : Restrict summing by date


foobar182
10-12-2001, 09:41 AM
Hi. I have a table that has 3 entries per date. I need to make a query that will sum the entries but only sum together entries with the same date. for example

amount shift Date
------------------------
200 1 9/2/01
300 2 9/2/01
300 3 9/2/01
100 1 9/18/01
150 2 9/18/01
200 3 9/18/01


the query would have to output this

amount Date
-----------------
800 9/2/01
450 9/18/01

im clueless

thanks in advance

arickards
10-12-2001, 10:13 AM
Something like this:

SELECT date, Sum(amount) AS TotalAmount
FROM tablename
GROUP BY date

HTH