Link to home
Start Free TrialLog in
Avatar of wtisystems
wtisystems

asked on

How do I use the SQL "SUM" function and group by the month of a date field?

This is what I'm trying to do.  The "Date.Month" (I know it's wrong) is the problem.
SELECT Date,SUM(Amount) as decTotalAmount FROM Transactions GROUP BY Date.Month
It should give me the total of transactions for each month.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wtisystems
wtisystems

ASKER

Thanks.  That was perfect.