Unduplicated Counts

J

JLAB

How do you do an unduplicated count using access ? By
unduplicated count I mean for example, lets say you have a
list of orders by customer and you want to know how many
unique customers you have disregarding the numebr of times
they placed an order. I can't seem to find an SQL function
that does that.
 
K

Ken Snell

This is how ACCESS writes the SQL for what you want. Note the use of [ ]
around the subquery and the . just outside the ] of the subquery.

SELECT Count(*) AS NumberOfCustomers
FROM [SELECT TableName.CustomerNumber
FROM TableName
GROUP BY TableName.CustomerNumber]. AS SourceTable;
 

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