Hi all,
I’m trying to count the total number of different ItemID from table Records, grouped by month. The query below calculates the total but not the DISTINCT ItemID’s. I found several related posts on the web but can’t manage to get my query working properly.
Can anyone please help?
Many thanks!
Eric
PS. To make it more complicated, is there a way to also include null values in the result? (if there are no ItemID’s in a particular month)
SELECT Format([Records].[Date],"yyyy/mm") AS [Month], Count(Records.ItemID) AS NumItemID
FROM Records
GROUP BY Format([Records].[Date],"yyyy/mm");