table join

  • 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?

  • 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...

  • Can you provide a bit more info

  • 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