Solved

Rank in MS Access

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

Gonaz
0
Comment
Question by:Gonaz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 52

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

737 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