22,301
社区成员




select userid from tb1 b where gup='C' and
exists(select null from tb1 a where a.userid=b.userid and gup<>'C')
select userid
from tab a
where 数据项='c'
and exists (
select 1 from tab
where userid = a.userid
and 数据项<>'c'
)
group by userid