Mysql group by 问题
生活随笔
收集整理的這篇文章主要介紹了
Mysql group by 问题
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
根據(jù)標(biāo)準(zhǔn)sql規(guī)定,select字段(除聚合函數(shù)與)必須跟在group by后,但mysql除外,即select * from table a group by a.property 無報(bào)錯(cuò)
聚合函數(shù)如下:
1. avg() 取其平均數(shù)
2.count() 取其數(shù)量,返回值為int?
3.max() 取其最大值
4.min() 取其最小值
5.sum() 取其之和(只能用于數(shù)字列)
6.count_big() 取其數(shù)量,返回值為bigint
?
轉(zhuǎn)載于:https://www.cnblogs.com/shizijie/p/6720574.html
總結(jié)
以上是生活随笔為你收集整理的Mysql group by 问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#:把dll封入exe中方法
- 下一篇: 《Redis开发与运维》学习第五章