David R
I know a few things...
- Local time
- Today, 13:52
- Joined
- Oct 23, 2001
- Messages
- 2,633
For once, I'm using Access for fun and not for profit...err, work.
I'm trying to query the game distribution on a site I'm at; There are seven players in each game, with 5 set roles (2 Mafia, 3 Townspersons) and two "optional": either the game contains a Doctor or it doesn't, and either the game contains a Cop or it doesn't. If either of those doesn't exist, they are additional Townspersons.
What I want to see is how having a Cop or Doctor factors into the outcome. Obviously there are four possible outcomes, the first two of which are fairly easy to test for:
My current queries are:
And the same thing, but with GameRole=3. Role 1 is Townie, and Role 4 is Mafia, if that matters.
I'm trying to query the game distribution on a site I'm at; There are seven players in each game, with 5 set roles (2 Mafia, 3 Townspersons) and two "optional": either the game contains a Doctor or it doesn't, and either the game contains a Cop or it doesn't. If either of those doesn't exist, they are additional Townspersons.
What I want to see is how having a Cop or Doctor factors into the outcome. Obviously there are four possible outcomes, the first two of which are fairly easy to test for:
- 1 Cop, No Doc;
- No Cop, 1 Doc;
- 1 Cop, 1 Doc;
- No Cop, No Doc;
My current queries are:
Code:
SELECT tableGames.GameResult, Count(tableGames.GameID) AS CountOfGameID
FROM tableGames LEFT JOIN tablePlayers ON tableGames.GameID = tablePlayers.GameID
WHERE (((tableGames.GameType)="C9 Newbie") AND ((tableGames.GameEnd) Is Not Null) AND ((tablePlayers.GameRole)=1))
GROUP BY tableGames.GameResult;