By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,363 Members | 3,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,363 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?
Feb 4 '19 #1
Share this Question
Share on Google+
2 Replies

Seth Schrock
Expert 2.5K+
P: 2,941
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.
Feb 4 '19 #2

Expert Mod 2.5K+
P: 3,284

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!
Feb 4 '19 #3

Post your reply

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