Unique Count In Access Query

C

cstraim

Howdy Folks

is there anyone out there that can possibly tell me the SQL code for a
query I'm trying to put together

My data is a follows (All in the same table we can call it "Table1")

Table1

Company Manager
AMEX James
AMEX James
AMEX Kush
FEDEX James
FEDEX John
CHASE James

I am trying to get the following results

Company Unique Manager Count
AMEX 2
FEDEX 2
Chase 1

If you notice AMEX only has two record managers (James and Kush), if I
were to do a straight count I would get "three" records managers. My
goal is to get the unique number of record managers per company

Thanks for all of your help!!!
 
K

KARL DEWEY

You can do it with two queries like this --
cstraim-1 ---
SELECT cstraim.Company, cstraim.Manager
FROM cstraim
GROUP BY cstraim.Company, cstraim.Manager;

SELECT [cstraim-1].Company, Count([cstraim-1].Company) AS CountOfCompany
FROM [cstraim-1]
GROUP BY [cstraim-1].Company;
 

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