having作用类似于where区别在于where在group by之前执行;having作用于group by。

1 proc sql;
2     select sum(cmcc_fee) as sumfee,product_name,port
3     from &groupset
4     group by product_name,port
5     having count(port)>2;
6 quit;