473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1577

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Irene | last post by:
Hi all, I have set up a simple VB program (and later on an ASP interface) to manage an Athletics database. I'm using Access 2000. To simplify, I have the Athlets, the Competitions and the...
1
by: John Brajkovich | last post by:
I have 10 tables that are identical in structure. They contain a location code, an employee id for that location and a score. In all of these tables a location code/employee id combanation uniquely...
2
by: ad | last post by:
I want to create a input form to Input the scores of a subject in a class. There are about 30 students in a class. I want to desplay 30 textboxes in a form at a time. The user can intput the score...
11
by: Penfold | last post by:
I'd appreciate help converting student average test scores into grades. My problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c etc through to 8c plus a couple of others)....
1
by: waldoruns | last post by:
I need help to finish this code.....Here is what I got so far...... /Read in test scores and output total number of scores, total number of each letter grade, //percentage of total for each...
3
by: Akinyemi | last post by:
I am writing a Visual Basic program for calculating students scores, and also grading the highest 3 scores as "First" , "Second" and "Third" respectively. I have been able to get the program to...
4
by: jocknerd | last post by:
About 10 years ago, I wrote a C app that would read scores from football games and calculate rankings based on the outcome of the games. In fact, I still use this app. You can view my rankings at...
0
by: Racqetsports | last post by:
Hi there, In a gradebook database, student grades must be computed from 2 scores: a Daily grade, and then scores from Assignments. Knowing about nested forms, I am requesting direction on how to...
8
by: d24706 | last post by:
Hello, I hope someone can help me. I had to do the following assignment( i have most of it done just cant finish it off, question and source code below). Question? Write a Java program that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.