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;
mysql数据库定时备份,MySQL列表值查询,mysql 清除open table,mysql从txt导入数据,mysql-5.0.,php 修改mysql数据php圆形素材,php发送极光自定义消息,viscode运行php项目,php 人物投票,wampserver使用php,php100留言板,phpmyadmin配置失败,phpL,阿里云短信验证码 php