count number of records for each group in a table

M

mikejones

This seems so basic but I can't figure out how to do it.

I have a table:
Settle date, value 1, value 2 ...
1/1/06 ...
1/1/06 ...
1/1/06 ...
1/2/06 ...
1/3/06 ...
1/3/06 ...

I want to know how many rows there are for each date, e.g.
Settle Date, Count
1/1/06 3
1/2/06 1
1/3/06 2

Forgive my ignorance; what is the query to do this?
 
D

Duane Hookom

Select [Settle Date], Count(*) as NumOf
FROM [a table]
GROUP BY [Settle Date];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top