Count / Summary of a unique field.

K

kdaniel7979

I know this should be simple. But I just can't remember how to do this.

I just want to count the number of unique countries in a table.

i.e. Table
Field1=Name, Field2=Country

Dan, Canada
Steve, Canada
Dave, USA
Fred, England

I just want a query / Report to give me the results:

Countries = 3


This simple solution has eluded me for 30 minutes now.

Thx
Dan
 
K

kasab

SELECT count(country) from Table;

You may have to GROUP BY country if more than 1 fields selected, but it is
not necessary for just one field.

(I had to look it up, too .. and I teach this stuff! :) )
 
K

kdaniel7979

Thanks,
When I had a mutli field query it wasn't working, which is why I had
trouble figuring it out. Then after I created a very basic query it
worked fine.

Cheers
 

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