having 对部分分组来进行过滤
跟在group by 后面
在having语句中不能包含未分组的列名,
select FAge,COUNT(*) from T_Employee where FSubCompany=‘beijing‘ group by FAge having COUNT(*)=2
having过滤语句
原文:http://www.cnblogs.com/lucky9/p/6255621.html