mysql语句为:
select * from student order by subject desc limit 10; 查询总分成绩前十:mysql语句为:
select sum(subject) subject,name from student group by name order by subject desc limit 10; 注: select sum(subject) subject,name 这句的意思是:sum(subject) subject 把单科成绩加总用subject 来命名(就是总成绩),name就是一个字段,这里只有两个字段。 group by name order by subject : group by name 的意思按照名字这一栏来分组,当然,学生成绩表名字有可能是一样的,按照学号是最准确的,这里只是举个例子。
order by subject 这句的意思是按照总分成绩排序,这里的subject 是前面重命名总分的意思。
select sum(subject) as countsubject,name from student group by name order by countsubject desc limit 10;
python查询mysql,mysql查看密码格式,mysql游标死循环,mysql cmd无法输入中文,wamp mysql 5.7,查看表内容 mysql