473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ranking student grade ? with subquery/subselect?

--Boundary_(ID_89yLhNmAybJBOhP/kmhVvw)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Hello,
I am a mySQL newbie here and have some problem defining the mySQL 4.0.14
or 3.23 SQL to get student grade ranking where tied grade have the same
rank.

I used to set it through MS Access 2002 and use this kind of query:

SELECT nilai.studentNIS, nilai.studenttestmark,
(SELECT COUNT(*) FROM tblStudentGrades
WHERE [studenttestmark]>[Nilai].[studenttestmark];)+1 AS NomorUrut FROM
tblStudentGrades AS nilai ORDER BY nilai.studenttestmark DESC;

I've been looking around mySQL documentation and read that subquery can
be redefined as INNER JOIN or using two SQL statement via variable? I
have no idea on the basics of how to set it out though :(

Could one of you please help give a me a sample on how this kind of
query should be done on mySQL? Is it possible to do it in single line?
And without having to use PHP/Perl scripts?

Or maybe I should have approach it differently?

Thanks in Advance

Regards,
Marcello s.


--Boundary_(ID_89yLhNmAybJBOhP/kmhVvw)--
Jul 19 '05 #1
0 2014

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
574
by: marcello stanley | last post by:
--Boundary_(ID_89yLhNmAybJBOhP/kmhVvw) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Hello, I am a mySQL newbie here and have some problem defining the mySQL...
3
24503
by: Evgeny Gopengauz | last post by:
Let us suppose that we have a table: CREATE TABLE transactions( currencyID_1 int, value_1 money, currencyID_2 int, value_2 money )
1
6374
by: Louis | last post by:
Hi, I am a first time poster here. I have been given an assignment to do from college and it is ot create a student gradebook. I have planned all the tables etc. to what I believe to be correct. I...
8
3212
by: ChrisMac | last post by:
Greetings, I have a database that keeps track of students grades (and lots of other info)for a non-profit training center. I have created an access database to track all of the student's...
5
3592
by: Bill | last post by:
Can I do this in one SQL statement? If so, please tell me how. I have wasted a ton of time on this but there has to be an easy way to do it. I should have done it with more than one statement...
11
3198
by: Penfold | last post by:
I'd appreciate help converting student average test scores into grades. My problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c etc through to 8c plus a couple of others)....
5
10887
by: valglad | last post by:
Hi, The question below was posted about 4 years ago and noone was able to answer it back then. I have virtually the same type of problem so would appreciate if anyone can help. Thanks ...
0
2069
by: Racqetsports | last post by:
Hi there, In a gradebook database, student grades must be computed from 2 scores: a Daily grade, and then scores from Assignments. Knowing about nested forms, I am requesting direction on how to...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.