Unique Count In Access Query

  • Thread starter Thread starter cstraim
  • Start date Start date
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!!!
 
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;
 
Back
Top