having 对部分分组来进行过滤
跟在group by 后面
在having语句中不能包含未分组的列名,
select FAge,COUNT(*) from T_Employee where FSubCompany='beijing' group by FAge having COUNT(*)=2