Count Group By

G

Guest

I have a table of transactions for multiple iterations of the same policy number. The Group By function works to LIST the distinct policy numbers, but how do I COUNT those "grouped" policy numbers to show results below
The "kicker" is I'd like to use the query design view in Access (not paste and copy SQL)..
e.g.
trans 1, policy number ab
trans 2, policy number ab
trans 1, policy number xy
Results = 2 Policy numbers (not 3)
 
M

Michel Walsh

Hi,



Make first a saved query, q1, out of your GROUP BY query, then, make a
second query:

SELECT COUNT(*)
FROM q1



You just count the number of records returned by the first query, which is
what it seems you seek.

Hoping it may help,
Vanderghast, Access MVP





Patrick said:
I have a table of transactions for multiple iterations of the same policy
number. The Group By function works to LIST the distinct policy numbers,
but how do I COUNT those "grouped" policy numbers to show results below?
 

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

Top