?
Solved

Rank in MS Access

Posted on 2004-04-19
4
Medium Priority
?
877 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 53

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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…

777 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