do students have more than one class?
Jun 20, 2022
7
Level 1
How to get rank student using laravel
I'm trying to get the rank of the student using the total marks, i.e. the student with higher marks than the other should be first and so on. Then when two or more students have the same total marks, they should have the same rank, help me. I have two tables. 1- table - students:
id name class_id created_at
1 Emma 1
2 Frank 3
3 Bright 4
4 Doe 1
2- table - marks:
id id_student class_id subject_id mark created_at
1 2 3 2 115
2 4 1 1 120
3 3 4 4 90
I want to get the rank for student the highly mark. How to make it please.
Please or to participate in this conversation.