Unduplicated Counts

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