To avoid all the extra [ ]s and redundant table names, etc,
just Paste the below SQL statement over your query's SQL
view.
SELECT Customer,
Count(*) AS [Number of Queries],
Count(*) / (SELECT Count(*)
FROM [Tbl_Query Support Log]) As Pct
FROM [Tbl_Query Support Log]
GROUP BY Customer
ORDER BY Count(Query ID) DESC
--
Marsh
MVP [MS Access]
SELECT [Tbl_Query Support Log].Customer, Count([Tbl_Query Support
Log].[Query ID]) AS [Number of Queries]
FROM [Tbl_Query Support Log]
GROUP BY [Tbl_Query Support Log].Customer
ORDER BY Count([Tbl_Query Support Log].[Query ID]) DESC;
Well, I meant for that to be a calculated field in your
existing query, but since I didn't see your query, I can't
be sure that it would be complete. To make sure please post
a Copy/Paste of your query's SQL view.
Jay wrote:
I don't really understand you (please forgive my newbie stumblings)
Do you mean do the total count in another query and then use that field
in my original query?
Marshall Barton wrote:
Jay wrote:
I have a very simple Totals query which counts the number of
enquiries
for
each customer, grouping by the customer field and counting the
customerID
field.
I want to be able to give the count as a percentage of the total
number
of
enquiries. How do I do this?
Use a subquery to calculate the total count. set your
percent column to something like:
Count(*) / (SELECT Count(*) FROM table)