Having的基本用法

select column1,avg(column2) from table_name group by column1 having avg(column2) > ***

 

说明:

1、group by:以column1为一组计算column2的平均值必须和avg、sum等整合性查询的关键字一起使用。

2、having:必须和group by一起使用作为整合性的限制。

posted @ 2011-01-03 17:29  yangzhiqw  阅读(264)  评论(0编辑  收藏  举报