Hi Guys,
I have a table with three fields: ID, Name, Mark
i also have created the following Query which ranks students in the table based on Mark
the problem: if there is a duplicated mark in tow records the query will skip a number like this:
John 50 1
Mark 60 2
Ali 60 2
Pall 70 4
i dont want number 3 to be skipped so the rank will be like this: 1,2,2,3
is there any solution ?
I have a table with three fields: ID, Name, Mark
i also have created the following Query which ranks students in the table based on Mark
Code:
SELECT T2.Name, 1+(SELECT COUNT(T1.Mark)
FROM
[Table] AS T1
WHERE T1.Mark >T2.Mark) AS Rank
FROM [Table] AS T2
ORDER BY T2.Mark DESC;
the problem: if there is a duplicated mark in tow records the query will skip a number like this:
John 50 1
Mark 60 2
Ali 60 2
Pall 70 4
i dont want number 3 to be skipped so the rank will be like this: 1,2,2,3
is there any solution ?