May 16, 2003 at 3:00 am
Hello
I am trying to run a query comparing data from two tables. I would like to get the result of 'player' in order.
Tbl1
player
Points
Tbl2
Player
selection
This is only a project and in tbl2 there are two players with many selections. Can anyone help?
May 16, 2003 at 6:31 am
What does the selection field represent? I am having trouble understanding what you want to output from your query, and what you want it ordered by...
May 17, 2003 at 10:27 pm
Can you provide a bit more info
June 12, 2003 at 2:23 pm
This will return the players in order of the number of points they have attained, assuming that player can be used to join the tables.
select player,sum(points) 'Sum of points'
from tbl1.player join tbl2.player
group by player
order by 'sum of points' desc
What do you wish to do with the selection?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply