sum a count column in query

  • Thread starter Thread starter Glenn
  • Start date Start date
G

Glenn

Hi,

I have the following fields (Acorn Catergory, CL Code).
I have a query that will group by Acorn Catergory then group by CL Code and
then count by CL Code.

This result shows me under each Acorn Catergory which CL Codes are there and
how many records that CL Code has entered for that Acorn Catergory. What I
want is to total the count of CL code under each catergory.

Please can you help
 
Drop out the display for CL Code.

Are do you want both counts? For that you will either need a separate query
or DCount function.
 
Try this --
SELECT TableA.[Acorn Catergory], Count(TableA_1.[CL Code]) AS CountOfCLCode,
[TableA].[CL Code], Count(TableA.[CL Code]) AS CountOfCLcode1
FROM TableA INNER JOIN TableA AS TableA_1 ON TableA.[Acorn Catergory]=
TableA_1.[Acorn Catergory]
GROUP BY TableA.[Acorn Catergory], [TableA].[CL Code];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Count with a twist 1
Data in sheet1 to be put into sheets 2, 3, 4, 5, etc 2
simple query count 3
counting 1
Query Criteria 1
Help with Query 2
Parameter Query and check boxes 1
Problem with Combo box on form 1

Back
Top