34,594
社区成员
发帖
与我相关
我的任务
分享
select deptid,count(userid) from clerk
group by deptid
having count(userid)>10
select distinct deptid from clerk a
where (select count(*) from clerk where deptid=a.deptid)>10
select deptid,count(deptid) from clerk group by deptid having count(deptid)>10
--try
select 员工编号,职务,组织编码
from clerk group by 员工编号,职务,组织编码 having (count(员工编号)>10)
select * from clerk where deptid in
(select deptid from clerk group by deptid having count(*)>10)