Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Inner Joins to determine ranks

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-16 : 08:13:51
Jonathan Hamblett writes "OK - I'm new at this so I hope that I make sense.

I'm doing a "golf prediction" website where people create teams of 10 golfers. At the end of each tournament, the winner is the one with the lowest aggregate score.

Here is my DB design....

Table 1 (Golfers) - Contains PlayerID, Name, Score
Table 2 (Users) - Contains UserID, TeamName (user can have more than 1 team) and 10 more Columns for each playerID they have chosen.

At the end of the tournament, I want to display the team ranks by the aggregate score of the 10 players.

So how would I do a join using SQL where it would sum into another column, then sort by that column ascending?

I hope that is clear.

Thanks,
Jonathan Hamblett"
   

- Advertisement -