424,294 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,294 IT Pros & Developers. It's quick & easy.

Counting duplicate occurrences once

P: 1
My Access table query lists names multiple times where each record shows another sale. Some sellers sold multiple times. I want to COUNT the number of sellers who sold, not every time they had a sale. For example, Seller X sold 4 times (4 records showing their sales), Seller Y sold 2 times (2 records showing their sales), I want ACCESS to COUNT the number of sellers who sold (2) not the number of sales records (6). How can I build a filter, query, ??? to perform this task?
2 Weeks Ago #1
Share this Question
Share on Google+
2 Replies


Seth Schrock
Expert 2.5K+
P: 2,920
You can run a SELECT DISTINCT query to get the sellers who are in your sale table. You can even filter it by a date range if you want.
2 Weeks Ago #2

twinnyfo
Expert Mod 2.5K+
P: 2,894
0javan,

Welcome to Bytes!

You can also aggregate:

Expand|Select|Wrap|Line Numbers
  1. SELECT Seller, Count(Sale) AS Sales 
  2. FROM tblSales
  3. GROUP BY Seller;
This will show you how many sales each seller has....

Hope this hepps!
2 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.