# 对分数进行排序:asc 升序, desc 降序;
默认升序:
select * from t_score order by score;
降序:
select * from t_score order by score desc;
# 分组:统计不同课程的总分数,并显示具体的课程名称
select sum(score) from t_score group by course_no;
select sum(score),course_no from t_score group by course_no;
select sum(score), s.course_no, c.cname
from t_score s left join t_course c on s.course_no=c.course_no
group by s.course_no;