hopefully quick question

P

pbuscio

I am trying to show the occurences of two names together regardless of order. In other words Jim and Joe and then Joe and Jim would be considered 2 occurences.

So sort of like this

Field1 Field2 Result
Jim Joe W
Joe Jim L
Jim Joe W

then a query

FieldA FieldB Win Lose
Jim Joe 2 1

Any ideas?

Thanks
 
P

pbuscio

I am trying to show the occurences of two names together regardless of order. In other words Jim and Joe and then Joe and Jim would be considered 2 occurences. So sort of like this Field1 Field2 Result Jim Joe W Joe Jim L Jim Joe W then a query FieldA FieldB Win Lose Jim Joe 2 1 Any ideas? Thanks

Or actually

FieldA Win Lose
Jim-Joe 2 1
 

fx3

Joined
Feb 17, 2013
Messages
13
Reaction score
0
You could have this as part of two queries...... query 1 and 2...

first query, calculates the scores and flips if necessary.. second one tallies up...

query1

SELECT IIf([a]>,[a],) AS contestant_a, IIf([a]>,,[a]) AS contestant_b, IIf([r] & ([a]>),1,0) AS wins, IIf([wins]=1,0,1) AS losses
FROM Table1;

query2

SELECT Query1.contestant_a, Query1.contestant_b, Sum(Query1.wins) AS SumOfwins, Sum(Query1.losses) AS SumOflosses
FROM Query1
GROUP BY Query1.contestant_a, Query1.contestant_b;



-------
http://acsdb.com
 
Last edited:

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