Solved

Rank in MS Access

Posted on 2004-04-19
4
841 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…

912 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

23 Experts available now in Live!

Get 1:1 Help Now