Full Version: Group By
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
Tim
Hi,

I have got Total sale and Date controls. Date has got 1/Feb/2005 format.
My question is how can I make a query which will group by month such as

Total Month
2423 Jan
Feb
etc etc. ?

Thanks
Tin
truittb
Date and Month are reserved word in Access and should not be used as object names. Also avoid spaces and special characters in object names.

Select Sum(TotalSale) as Total, Format(YourDate,"mmm") as YourMonth
From YourTable
Group By Format(YourDate,"mmm")
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.