Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many per month qry 1

Status
Not open for further replies.

Spikemannen

Instructor
Feb 22, 2005
58
SE
Hallo,

I have a tbl like this:

arrend
date
amount of time

And I would like my query to show how many arrends I have per month. How should I do this?

Best Regardz,

Spikemannen
 
Something like this ?
SELECT Format([date field], 'yyyy-mm') As [Month], Count(*) As [Count]
FROM yourTable
GROUP BY Format([date field], 'yyyy-mm');

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Okay... Thanks, but I do need som more input.
This is how it looks.

qryArrendsPerMonth

Arrende Date Amount of time
tblSupport tblSupport tblSupport

Where should put in you text?


Best Regardz,

Spikemannen
 
Go in SQL view and paste this code:
SELECT Format(tblSupport.Date, 'yyyy-mm') As [Month], Count(*) As [Count]
FROM tblSupport
GROUP BY Format(tblSupport.Date, 'yyyy-mm');

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top