I have a student marksheet table. like that..
SELECT * FROM MARKSHEET_TAB ORDER BY FULL_MARKS DESC
| Reg_No | Marks_Obtain | Full_Marks | Roll_No |
| R1051 | 651 | 900 | 22 |
| R1032 | 645 | 900 | 5 |
| R1013 | 645 | 900 | 3 |
| R1025 | 638 | 900 | 8 |
| R1011 | 625 | 900 | 12 |
I want to display these records if those students have obtained same marks then rank sheet will generated based on their class roll no. that is..
| Reg_No | Marks_Obtain | Full_Marks | Roll_No | Rank |
| R1051 | 651 | 900 | 22 | 1 |
| R1013 | 645 | 900 | 3 | 2 |
| R1032 | 645 | 900 | 5 | 3 |
| R1025 | 638 | 900 | 8 | 4 |
| R1011 | 625 | 900 | 12 | 5 |
Please solve this problem.

Jignesh KumarRank #91 · 22.9K reputationPosted Nov 24, 2018, 4:21 PM EST
Prakash MondalRank #5,602 · 293 reputationPosted Nov 23, 2018, 7:06 PM EST
returns correct result. but the 2nd query
from Result order by marks_obtain desc, roll_no asc
Jignesh KumarRank #91 · 22.9K reputationPosted Nov 23, 2018, 4:09 PM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Nov 24, 2018, 12:55 AM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Nov 23, 2018, 10:11 PM EST