I've been struggling with this off and on over the last couple days trying
to figure out how to do some calculations on an MSAccess db. I've looked
through all my sql books but haven't hit on the answer. It is very simple,
but my knowledge of sql is just too limited I'm afraid.

Basic table structure involved is:

tblWinners

ABCName..NOPName..Win
Adam.....Nick.....abc
Bart.....Otto.....abc
Caty.....Pete.....nop
Adam.....Nick.....abc
Bart.....Otto.....nop
Caty.....Pete.....nop
Adam.....Nick.....nop

I need to figure out the sql query that will run through all records in the
table for each "ABCName" and count the number of times "abc" shows up in the
"Win" column. For the above sample, the query results would be:

Adam - 2
Bart - 1
Caty - 0

Ideally I would like a query that would figure it out for both ABCName and
NOPName (count "abcname" with abc under "win" and "nopname" with nop under
"win") but if this is not easily done, I can run two different queries, one
for each. But if possible I'd like to get query results like this:

Adam - 2
Bart - 1
Caty - 0
Nick - 1
Otto - 1
Pete - 2

Thanks for any help.

Paul Sinclair

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to