In MS Access 2003, how do I create a COUNT query that will GROUP BY 2 criteria?

In MS Access 2003, how do I code a query for a COUNT, grouping through two criteria?  I need to query a set of records to find out how often each client bought from each seller.

e.g.:  I need to ask how many times did each client purchase from each seller.  Any ideas?
The result needs to have CLIENTID, Number of Purchases, SellerID.
PorterConsultingLLCAsked:
Who is Participating?
 
EmesConnect With a Mentor Commented:
select count(client),Count(seller),Seller,Client
from table
group by client, Seller
0
 
PorterConsultingLLCAuthor Commented:
I do not need to know how many sellers there are, only how many sales each seller made to each client and who the sellers were.  I took your comment and wrote the following:

SELECT COUNT Sales, Seller, Client
FROM Table
GROUP BY SELLER, CLIENT
ORDER BY CLIENT;

and got exactly what I needed.

THANK YOU!!
0
 
PorterConsultingLLCAuthor Commented:
A slight change to the coding to fit my needs gave me exactly what I needed.  THANK YOU!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.