create function uf_getClass(@nMales int) returns intas begin return (select count(*) from (select classno from student where ssex='男' group by classno having COUNT(*)>@nMales) t)end