Hi Folks - I am trying to create a query that will return the number of visitors we have each month, as well as the number of unique visitors in that same month. i.e. In April we had 135 visitors, 85 of which were unique (some visitors come in multiple times.) The SQL that I have in my query so far is returning the number of visitors per month, but I am not able to nail down the syntax for the "unique ID" part.
This is what I have at the moment:
SELECT DISTINCTROW Format$([Daily Visits Table].[Visit Date],'mmmm yyyy') AS [Visit Date By Month], Round(Sum([Daily Visits Table].TimeSpent)/60,2) AS [Sum Of TimeSpent], Count(*) AS [Count Of Daily Visits Table], (SELECT COUNT(*) AS IDCount
FROM ((SELECT DISTINCT ID FROM Daily Visits Table) AS DistinctID)) AS DistinctIDs
FROM [Daily Visits Table]
GROUP BY Format$([Daily Visits Table].[Visit Date],'mmmm yyyy'), (SELECT COUNT(*) AS IDCount
FROM ((SELECT DISTINCT ID FROM Daily Visits Table) AS DistinctID)), Year([Daily Visits Table].[Visit Date])*12+DatePart('m',[Daily Visits Table].[Visit Date])-1;
When I run this I am getting the error message: "Syntax error in query expression "(SELECT COUNT(*) AS IDCount FROM ((SELECT DISTINCT ID FROM Daily Visits Table) AS DistinctID)),"
What am I doing wrong here?
Thanks!
BristolGarry