I'm doing a hall of fame list and I have two tables:
Players:
PID-NICK (Playerid,Nick)
1-KANA
2-KOIRA
3-KETTU
And
Games:
GID-WID (Gameid, Winnerid)
1-1
2-1
3-2
What query gives the following result:
NICK-NUMBER OF WINS
KANA-2
KOIRA-1
KETTU-0
I dont know how to get the KETTU included since he has no wins.
Including count(x) = 0
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
IT's a rather a player list than hall of fame, so i need to have all of them
How can i 'reverse' it?
Code: Select all
Select PID as Nick, Count(WID) as WINS from Players P games G where P.PID=G.WID
Results:
NICK-WINS
KANA-2
KOIRA-1-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England