表的内容如下:

//查询单分数最高的人ID
select stuid,max(score) from stu_select_class;
// 查询各科总分2-3名的学生
select stuid, sum(score) from stu_select_class group by stuid limit 1,2;
//查询每科的最高分学生
select classname,stuid,max(score) from stu_select_class group by classname;
//查询总分低于140的学生
select stuid, sum(score) from stu_select_class group by stuid having sum(score)
//查询总平均分在60-80的学生
select stuid, avg(score) from stu_select_class group by stuid having avg(score) between 60 and 80;
//查询。。。。的学生
select stuid, sum(score),avg(score) from stu_select_class group by stuid having sum(score)
//查询总分。。的学生人数。
select distinct count( stuid) from stu_select_class group by stuid having sum(score)
//查询。。。的学生人数
select count(distinct stuid) from stu_select_class where classname='english' and score
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号