聚合函数操作

(7) select

(8) [distinct] <select_list>  # 这里可以是*、字段名、聚合函数(avg([distinct] 字段名)、max([distinct] 字段名)、min([distinct] 字段名)、sum([distinct] 字段名)、count([distinct] 字段名))

(1) from <left_table>

(3) [left | right |inner ] join <right_talbe> #级联表

(2) on <join_condition>  #级联条件

(4) where <where_condition> #where条件 ,这里不能有聚合函数

(5) group by <group_by_list> #按照某个或者某几个字段分组

(6) having <having_condition>  #聚合查询时的条件

(9) order by <order_by_condition> #排序

(10) limit <limit_number> #查询前几条

 

补充:查询时可以用聚合运算  :运算符   +   -  *  /   %

 

posted @ 2021-04-24 07:27  苍山如海,残阳如血  阅读(90)  评论(0)    收藏  举报