I have a student's table with the following fields:
student(student_id, student_name, student_avg)
I need to write a query in MySQL which will display the result as :
Serial no. => the result should also have a new column with serial number as 1,2,3,...,n like an auto increment for each row in the result.  
student_id
student_name
student_avg > 4
I don't want to alter my table in any way. All I have to do is write a query which will give me the above result. I hope I am clear.
Example data:
student_id         student_name      student_avg 
 1                    abc               2.5
 2                    xyz               4.1
 3                    def               4.2     
Sample output after querying:
serial_no    student_id    student_name     student_avg
  1             2            xyz               4.1
  2             3            def               4.2
                If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With