Counting

D

Dan Moun

Is there a way to count how many times info is entered in
a particular column? For example I need the query to
count the number of times each state is entered in a
table.

i.e. Alabama 27
Alaska 53
Arizona 33
Arkansas 12

Any suggestions would be greatly appreciated

Thanks
 
J

John Spencer (MVP)

Use a totals query.

SELECT StateName, Count(StateName) as CountThem
FROM YourTableName
Group By StateName

If you are using the query grid,
Add the StateName field to your query two times
Select View: Totals from the menu
Set the total for the first StateName to Group by
and the total for the second StateName to Count

That should do it.
 

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