Solved

Rank in MS Access

Posted on 2004-04-19
4
829 Views
Last Modified: 2008-03-17
How can I calculate rank of students in MS Access?

Gonaz
0
Comment
Question by:Gonaz
4 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 10861147
How you define "rank" ?

if you need rank of the records compare with a value in a column, try use the "Order By" clause.

Example:

Select * from Student Order By ExamPoints DESC

This will returns the student list in descending order comparing the Exam Points, for example.

Let us know if need more helps
0
 
LVL 6

Expert Comment

by:nathaniel
ID: 10874842
Hi Gonaz,

Example of ranking Students by Score. Say if you want to get the Top 10 Students based on score or average score:

use the following SQL script:

SELECT TOP 10 STUDENT_NAME, STUDENT_SCORE
FROM STUDENT_GRADES
ORDER BY STUDENT_SCORE DESC;

or

SELECT TOP 10 STUDENT_NAME, Avg(STUDENT_SCORE) AS [AVE SCORE]
FROM STUDENT_GRADES
GROUP BY STUDENT_NAME
ORDER BY Avg(STUDENT_GRADES.STUDENT_SCORE) DESC;

Hope this helps,

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now