469,347 Members | 1,809 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

top X scores for each user

Hello,

I have a table called tbl_skill_scores

user_id - primary
skill - varchar
score - int

Each user has 6 entries in this table, one for each skill.

I'm trying to write sql that will return me each user's best 4 skills
- i.e. the 4 out of the 6 that they are best at, so user 1 will have
skills ABCD but user 2 could have BCDE.

Once I have that I need to average them, but that shouldn't be too
hard - it's getting each user's top 4 scores that I'm stumped on.

can anyone nudge me in the right direction?

Many thanks,

Amy

p.s. this is a sql question that happens to be about my ms-sql
database, should I post this query here as I have done, or on
comp.databases as it could be considered a more 'general' sql
question? - A

Jul 11 '07 #1
0 1496

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John Brajkovich | last post: by
2 posts views Thread by ad | last post: by
1 post views Thread by waldoruns | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.