Search code examples
mysqlsqlselectlimitranking

sql query to get the student name with rank between 10 and 20 out of 100 students?


i have list of 100 students with there total marks and names.Based on this mark give rank to each students. i need to find the names of those students whose rank between 10th rank to 20th rank. students having rank 10,11,12...20 in the ascending order.


Solution

  • Try this:

    SELECT studentName FROM studentTable ORDER BY totalMarks DESC LIMIT 10, 10;