假设有学生名(student_name)和对应的一系列得分(score),按学生的总得分进行倒序排序,则可按照下述操作。
select student_name,sum(score) as scores
from your_table
where (day BETWEEN '2022-03-15' and '2022-06-15')
group by student_name
order by scores DESC
假设有学生名(student_name)和对应的一系列得分(score),按学生的总得分进行倒序排序,则可按照下述操作。
select student_name,sum(score) as scores
from your_table
where (day BETWEEN '2022-03-15' and '2022-06-15')
group by student_name
order by scores DESC