That works perfectly. I did not know that you could alias a table name
multiple times to get multiple distinct selects out of it.
Simple yet elegant. Thanks.
> Hi.
>
> Presuming you have the team names in a seperate table, you could write
> something like:
>
> SELECT home.name, away.name, winn
Hi.
Presuming you have the team names in a seperate table, you could write
something like:
SELECT home.name, away.name, winner.name
FROM games, teams AS home, teams AS away, teams AS winner
WHERE home.id = games.homeid AND
away.id = games.awayid AND
winner.id = games.winnderid A
I'm sort of new/rusty to SQL and I was trying to figure out the best way to
do this problem. I'm creating a database for tracking a football pool. I'm
kind of stuck on displaying the Games database. The Games database has a
home team ID and an away team ID as well as the winning team ID. Thus I ne