汇总数据

1.AVG()函数

 eg./*产品均价设置为小数点后两位。从表中查询1003的商品的均价*/

  select round(avg(prod_price)) as 均价

  form products

  where vend_id=1003

2.COUNT()函数——指定列的数目,NULL不计入

 eg./**/

  select round(avg(prod_price)) as 均价

  form products

  where vend_id=1003

3.MAX()函数——数字最大的

4.MIN()函数——数字最小的

5.SUM()函数——求和

6.distinct——去重复的值

原文地址:https://www.cnblogs.com/KeenaCherry/p/9623928.html