?
Solved

Rank in MS Access

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

Gonaz
0
Comment
Question by:Gonaz
2 Comments
 
LVL 54

Accepted Solution

by:
Ryan Chong earned 200 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
How much do you know about the future of data centers? If you're like 50% of organizations, then it's probably not enough. Read on to get up to speed on this emerging field.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

839 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