我是靠谱客的博主 贤惠金鱼,这篇文章主要介绍mysql 查询表中平均分最低的班级,现在分享给大家,希望可以做个参考。

复制代码 代码如下:

drop table if exists dd;
create table dd (
user_id int ,
class_no int ,
score int
);
insert into dd values (1,1,1), (2,1,1), (3,1,2), (4,2,2);
select class_no ,avg(score)from dd group by class_no order by avg(score);

在MySQL下面测试通过。

最后

以上就是贤惠金鱼最近收集整理的关于mysql 查询表中平均分最低的班级的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(189)

评论列表共有 0 条评论

立即
投稿
返回
顶部