mysql中order by与group by的区别
时间:2024-01-21 19:50:24
order by 从英文里理解就是行的排序方式,默认的为升序。 order by 后面必须列出排序的字段名,可以是多个字段名。
group by 从英文里理解就是分组。必须有“聚合函数”来配合才能使用,使用时至少需要一个分组标志字段。
什么是“聚合函数”?
像sum()、count()、avg()等都是“聚合函数”
使用group by 的目的就是要将数据分类汇总。
标签:mysql,order,by,group,by
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
vue实现拖拽效果
2024-05-02 16:59:58
![](https://img.aspxhome.com/file/2023/1/130081_0s.jpg)
vue3的watch用法以及和vue2中watch的区别
2024-04-30 08:42:37
![](https://img.aspxhome.com/file/2023/6/132996_0s.png)
Python编程实现双链表,栈,队列及二叉树的方法示例
2021-11-10 12:35:17
通过两种方式增加从库——不停止mysql服务
2024-01-17 17:44:28
盘点网络编程必须要知道的基础知识
2022-05-27 22:06:16
![](https://img.aspxhome.com/file/2023/4/131794_0s.png)
pip已经安装好第三方库但pycharm中import时还是标红的解决方案
2022-05-25 00:50:16
![](https://img.aspxhome.com/file/2023/8/65018_0s.png)
Python基于pygame实现单机版五子棋对战
2021-02-26 05:53:54
![](https://img.aspxhome.com/file/2023/4/65974_0s.jpg)
需要使用php模板的朋友必看的很多个顶级PHP模板引擎比较分析
2023-11-19 02:10:43
面向对象的 Javascript
2013-07-21 11:57:22
安装ElasticSearch搜索工具并配置Python驱动的方法
2021-03-12 12:07:52
![](https://img.aspxhome.com/file/2023/8/93018_0s.png)
Dreamweaver4探谜系列(1)
2010-09-05 21:12:00
PyQt4实现下拉菜单可供选择并打印出来
2023-08-19 01:10:35
![](https://img.aspxhome.com/file/2023/6/118806_0s.png)
解决python3 pika之连接断开的问题
2021-09-28 18:40:09
Host localhost is not allowed to conn
2011-02-23 12:41:00
快速了解Python开发中的cookie及简单代码示例
2023-05-29 11:04:05
![](https://img.aspxhome.com/file/2023/7/128787_0s.png)
Mysql数据库清理binlog日志命令详解
2024-01-14 09:04:07
![](https://img.aspxhome.com/file/2023/4/96494_0s.jpg)
Numpy 数据处理 ndarray使用详解
2021-01-30 18:05:11
![](https://img.aspxhome.com/file/2023/7/101067_0s.jpg)
如何通过shell脚本自动生成vue文件详解
2024-05-22 10:28:35
![](https://img.aspxhome.com/file/2023/1/123701_0s.jpg)
ShardingSphere数据库读写分离算法及测试示例详解
2024-01-19 06:21:09
![](https://img.aspxhome.com/file/2023/7/76607_0s.png)
一步步解析Python斗牛游戏的概率
2021-05-03 05:17:27