select count query

S

Striker3070

I have a ACCESS07 table that has a field called Unit, and another field
called Members. Each unit can have up to 48 members, and there are many
units in the table.

I need to figure out how to do a select count to find out how many members
each unit has. Nothing I try works. So how would I do a select count for
each unit and return the number of members in it.
 
B

Banana

You need to use GROUP BY.

Example:

SELECT Unit, Count(Members)
FROM aTable
GROUP BY Unit;
 

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