Update your aggregate query to something like:
SELECT myTable.account, Count(myTable.person_no) AS CountOfperson_no,
Count(myTable.mail) AS CountOfmail
FROM myTable
GROUP BY myTable.account
HAVING myTable.Mail="y";
Dawn Crosier
Application Specialist
"Education Lasts a Lifetime"
This message was posted to a newsgroup. Please post replies and
questions to the group so that others can learn as well.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Bradshaw, Peter A C301
Sent: Thursday, February 09, 2006 11:53 AM
To: [email protected]
Subject: RE: [ms_access] Summary query
but that doesn't take into account I only want "Y" values counted.
- PETE
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Lonnie Johnson
Sent: Thursday, February 09, 2006 12:39 PM
To: [email protected]
Subject: Re: [ms_access] Summary query
You could use an aggregate query that would look something like
this...
SELECT myTable.account, Count(myTable.person_no) AS
CountOfperson_no, Count(myTable.mail) AS CountOfmail
FROM myTable
GROUP BY myTable.account;
"Bradshaw, Peter A C301" <[EMAIL PROTECTED]> wrote:
Given the following table:
Account Person_no Mail
1111111 111223333 Y
1111111 222442222 Y
1111111 555222222 Y
1111111 444779999
2222222 666889999 Y
2222222 888334444 Y
2222222 999777777
2222222 999998888
2222222 111773333
3333333 888882222
3333333 000440000
I need to produce a spreadsheet (so I was thinking in terms of
query)
that will count Person_no's for each account AND count how many
"Y"
values it finds in the Mail field
I need to see this:
Account c_Per C_Mail
1111111 4 3
2222222 5 2
3333333 2 0
Pete Bradshaw
Fulfillment Business Services Production Support
CIGNA HealthCare
860.226.3019 (N:572.3019)
mailto:[EMAIL PROTECTED]
------------------------------------------------------------------------
------
CONFIDENTIALITY NOTICE: If you have received this email in error, please
immediately notify the sender by e-mail at the address shown. This
email transmission may contain confidential information. This
information is intended only for the use of the individual(s) or entity
to whom it is intended even if addressed incorrectly. Please delete it
from your files if you are not the intended recipient. Thank you for
your compliance. Copyright 2006 CIGNA
========================================================================
======
[Non-text portions of this message have been removed]
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/