Originally Posted by
June7
Do a query that returns Distinct values then use that query in another query to do aggregate count.
Query1
SELECT DISTINCT [Test Item], [Store #] FROM TBLData;
Query2
SELECT [Test Item], Count([Store #]) AS CountStore FROM Query1 GROUP BY [Test Item];
As one nested query:
SELECT [Test Item], Count([Store #]) AS CountStore FROM (SELECT DISTINCT [Test Item], [Store #] FROM TBLData) AS Query1 GROUP BY [Test Item];
Advise not to use spaces and special characters/punctuation (underscore is exception) in naming convention.