语法:having [search-condition]
search-condition 指定组或聚合满足的搜索提哦案件。当having 与group by all 一起用时having语句代替all
例如:select distinct demp ,count(*) as counts,max(jbgz) as maxgx,avg(jbgz) as avggz from tab_laborage group by demp having avg(jbgz)>1500
将部门工资大于1500 的部门信息检索出来