Link to home
Start Free TrialLog in
Avatar of paulnet
paulnet

asked on

T-SQL Ranking Problem

I'm trying to code a way to determine a person's rank from my REGISTRATION table. Here's a brief sample of what the table looks like:

REGISTRATION

student    event   conference_id   score
---------    -------   -----------------   -------
Bob          2          1                        16
Jim           2          1                         12
Kim          2          1                          21
Bob         3          1                          70
Juan        3          1                         55
Jack        2          2                         18
Sally        2         2                         24

What I want to do is to be able to pull all of Bob's events and display his score and rank for each event. But here is where I'm having trouble ... his rank can only be determined within his conference.

Thanks,

Paul
Avatar of chapmandew
chapmandew
Flag of United States of America image

using sql 2005?
ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paulnet
paulnet

ASKER

Wow, chapmandew, that works. I'm going to do a few more tests with my app before I accept the solution.

BTW, yes, it is SQL 2005

Thank you so much!!
very welcome!