Link to home
Start Free TrialLog in
Avatar of Phil Chapman
Phil ChapmanFlag for United States of America

asked on

Grouping Records By Year Query

The query below gives me the total accounts with the same submission date.  But  I need the total accounts with the same year only.

What needs to be changed in the query?


SubmissionDate is a DateTime datatype

SELECT count(account)as NumOfAccounts,SubmissionDate
FROM Accounts
Group By SubmissionDate HAVING count(account)> 0
ASKER CERTIFIED SOLUTION
Avatar of Rajeev
Rajeev
Flag of India 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 Phil Chapman

ASKER

Perfect!

Thanks